A themeable LS_COLORS generator with a rich filetype datebase
https://github.com/sharkdp/vivid.git
vivid is a generator for the LS_COLORS environment variable that controls the colorized output of
ls, tree,
fd, bfs, dust and many other tools.
It uses a YAML configuration format for the filetype-database
and the color themes. In contrast to
dircolors,
the database and the themes are organized in different files. This allows users to
choose and customize color themes independent from the collection of file extensions.
Instead of using cryptic ANSI escape codes, colors can be specified in the RRGGBB
format and will be translated to either truecolor (24-bit) ANSI codes or 8-bit codes
for older terminal emulators.
snazzy | molokai | ayu |
|---|---|---|
![]() | ![]() | ![]() |
lava |
|---|
![]() |
Choose a color theme (for example: molokai). Then, add this to your shells RC file
(~/.bashrc, ~/.zshrc, โฆ):
`` bash
export LS_COLORS="$(vivid generate molokai)"
%%CODEBLOCK0%%fish
set -gx LS_COLORS "$(vivid generate molokai)"
%%CODEBLOCK1%% bash
for theme in $(vivid themes); do
echo "Theme: $theme"
LS_COLORS=$(vivid generate $theme)
ls
echo
done
%%CODEBLOCK2%% bash
export LS_COLORS="$(vivid -m 8-bit generate molokai)"
%%CODEBLOCK3%% bash
wget "https://github.com/sharkdp/vivid/releases/download/v0.10.1/vivid_0.10.1_amd64.deb"
sudo dpkg -i vivid_0.10.1_amd64.deb
%%CODEBLOCK4%% bash
pacman -S vivid
%%CODEBLOCK5%% bash
emerge vivid
%%CODEBLOCK6%% bash
pkg install vivid
%%CODEBLOCK7%% bash
brew install vivid
%%CODEBLOCK8%%bash
brew install coreutils
alias ls="gls --color"
%%CODEBLOCK9%% bash
cargo install vivid
`
## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
## Useful resources
File types:
- https://en.wikipedia.org/wiki/List_of_file_formats
- https://fileinfo.com/
ANSI colors:
- https://jonasjacek.github.io/colors/
Similar and related projects:
- https://github.com/karlding/dirchromatic
- https://github.com/trapd00r/LS_COLORS
- https://geoff.greer.fm/lscolors/
- LS_COLORS` themes: