Replace termbox-go with tcell (#439)
Fix colour construction issue This also has a test to mitigate it in the future Remove `colormode` option The original issue it was trying to solve is no longer present with tcell (it being a holdover from `color256` on termbox) so it is not needed. retire gitter channel in favor of irc/matrix Export options as environment variables (#448) * Export options as environment variables Any options from gOpts are available via lf_OPTION environment variables. For now it works only on booleans, integers and strings (no array support) * Do not export some of the options * Add support for arrays and fix numbers * Fix comments * Replace 1 and 0 with true and false * Export hidden,reverse,dirfirst and sortby options * Fix comments * Little fix * Simplify boolean conversion log readlink errors instead of fail Related #447 and #374
This commit is contained in:
1 parent
d25faf7186
commit
24f01f4988
16 files changed
+477
-419
No files matched your search
@@ -97,7 +97,6 @@ The following command line commands are provided by lf:
|
||||
The following options can be used to customize the behavior of lf:
|
||||
|
||||
anchorfind boolean (default on)
|
||||
color256 boolean (default off)
|
||||
dircounts boolean (default off)
|
||||
dirfirst boolean (default on)
|
||||
drawbox boolean (default off)
|
||||
@@ -929,25 +928,29 @@ If both of these environment variables are not set, then lf fallbacks to its
|
||||
default colorscheme. Default lf colors are taken from GNU dircolors defaults.
|
||||
These defaults use 8 basic colors and bold attribute.
|
||||
|
||||
You should also note that lf uses 8 color mode by default which uses sgr 3-bit
|
||||
color escapes (e.g. '\033[34m'). If you want to use 256 colors, you need to
|
||||
enable 'color256' option which then makes lf use sgr 8-bit color escapes (e.g.
|
||||
'\033[38;5;4m'). This option is intended to eliminate differences between
|
||||
default colors used by ls and lf since terminals may render 3-bit and 8-bit
|
||||
escapes differently even for the same color.
|
||||
It is worth noting that lf uses as many colors are advertised by your terminal's
|
||||
entry in your systems terminfo or infocmp database, if this is not present lf
|
||||
will default to an internal database. For terminals supporting 24-bit (or
|
||||
"true") color that do not have a database entry (or one that does not advertise
|
||||
all capabilities), support can be enabled by either setting the '$COLORTERM'
|
||||
variable to "truecolor" or ensuring '$TERM' is set to a value that ends with
|
||||
"-truecolor".
|
||||
|
||||
Keeping this mechanism in mind, you can configure lf colors in two different
|
||||
ways. First, you can configure 8 basic colors used by your terminal and lf
|
||||
should pick up those colors automatically. Depending on your terminal, you
|
||||
should be able to select your colors from a 24-bit palette. This is the
|
||||
recommended approach as colors used by other programs will also match each
|
||||
other.
|
||||
Keeping this in mind, you can configure lf colors in two different ways. First,
|
||||
you can configure 8 basic colors used by your terminal and lf should pick up
|
||||
those colors automatically. Depending on your terminal, you should be able to
|
||||
select your colors from a 24-bit palette. This is the recommended approach as
|
||||
colors used by other programs will also match each other.
|
||||
|
||||
Second, you can set the values of environmental variables mentioned above for
|
||||
fine grained customization. This is useful to change colors used for different
|
||||
file types and extensions. '$LS_COLORS' is more powerful than '$LSCOLORS' and
|
||||
it can be used even when GNU programs are not installed on the system. You can
|
||||
combine this second method with the first method for best results.
|
||||
file types and extensions. '$LS_COLORS' is more powerful than '$LSCOLORS' and it
|
||||
can be used even when GNU programs are not installed on the system. You can
|
||||
combine this second method with the first method for best results. lf can also
|
||||
be configured to ignore your terminal theme and output colors "as they were
|
||||
intended" by translating all numbered colors into a 24-bit output that matches
|
||||
the description; this can be enabled by setting the environment variable
|
||||
'$TCELL_TRUECOLOR' to "on" (or any text except ""/nothing or "disable").
|
||||
|
||||
Lastly, you may also want to configure the colors of the prompt line to match
|
||||
the rest of the colors. Colors of the prompt line can be configured using the
|
||||
|
||||
Reference in new issue
Block a user