Skip to content
Gökçehan Kara edited this page Mar 20, 2023 · 3 revisions

Existence of this wiki page is only due to historical reasons. Information about colors and icons configuration has been added to the documentation. In the most likely case, you just need to grab example colors and icons files from the repository under etc directory and put them in your configuration directory with proper names:

mkdir -p ~/.config/lf
curl https://raw.githubusercontent.com/gokcehan/lf/master/etc/colors.example -o ~/.config/lf/colors
curl https://raw.githubusercontent.com/gokcehan/lf/master/etc/icons.example -o ~/.config/lf/icons

For icons, you also need to enable the option (i.e. set icons) in your configuration file. The exact location of these configuration files are listed in "Configuration" section of the documentation. More information about colors and icons configuration mechanisms can be found in "Colors" and "Icons" sections of the documentation.

From version r27 onwards, colors and icons file support was added as a replacement for the previous configuration method using environmental variables. Old environmental variable method remains in the program as a fallback mechanism to have better default colors when the user does not have any configuration. Icon configuration through environment variables is also left in the program only to keep the symmetry between colors and icons configuration mechanisms. However, it is highly recommended to use icons file for the icon configuration instead. For color configuration, you can still prefer environmental variables if and only if you want to maintain a common configuration for ls and lf.

The advantages of configuration files over environmental variables are as follows:

  • Configuration for lf does not leak to shell configuration files.
  • You can set your terminal to directly launch lf without any wrapper shell.
  • There is no need to restart your shell or relog for the configuration changes to take effect.
  • Configuration file syntax is much more readable (i.e. white space seperated pairs vs multiline strings with line escapes).
  • The use of environmental variables for configuration are unusual in Windows.

Apologies for all the pain this change has caused.

Troubleshoot

If you have question marks or strange symbols showing up as icons, first make sure you have nerd fonts installed and your terminal is configured to use this font. If the icons can be displayed in the terminal but they do not show up in lf, then make sure you have a proper setup for your locale. You can type locale in your terminal to show your configuration. Make sure your locale configuration is set to use utf-8 encoding (e.g. en_US.UTF-8).

Clone this wiki locally