๐Ÿ“ฆ sharkdp / vivid

A themeable LS_COLORS generator with a rich filetype datebase

โ˜… 2.1k stars โ‘‚ 100 forks ๐Ÿ‘ 2.1k watching โš–๏ธ Apache License 2.0
ansi-codescolorcolor-themefilesystemshellterminal
๐Ÿ“ฅ Clone https://github.com/sharkdp/vivid.git
HTTPS git clone https://github.com/sharkdp/vivid.git
SSH git clone git@github.com:sharkdp/vivid.git
CLI gh repo clone sharkdp/vivid
Ryan Delaney Ryan Delaney Merge pull request #177 from sharkdp/fix-keynote-ext 85b7943 12 days ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ .vscode
๐Ÿ“ config
๐Ÿ“ schemas
๐Ÿ“ src
๐Ÿ“ tests
๐Ÿ“ themes
๐Ÿ“„ .gitignore
๐Ÿ“„ Cargo.lock
๐Ÿ“„ Cargo.toml
๐Ÿ“„ CHANGELOG.md
๐Ÿ“„ Dockerfile
๐Ÿ“„ LICENSE-APACHE
๐Ÿ“„ LICENSE-MIT
๐Ÿ“„ README.md
๐Ÿ“„ README.md

vivid

CICD Crates.io

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.

Preview

snazzymolokaiayu
snazzy thememolokai themeayu theme
lava
lava

Usage

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:

  • https://github.com/seebi/dircolors-solarized
  • https://github.com/ivoarch/dircolors-zenburn
  • https://github.com/arcticicestudio/nord-dircolors
  • https://github.com/peterhellberg/dircolors-jellybeans
  • https://github.com/KKPMW/dircolors-moonshine