eza_colors-explanation(5)

πŸ’… Name πŸ’…

okay bestie, welcome to the eza_colors-explanation(5) page from the File Formats Manual β€” the extra-details page all about customizing eza colors. it's giving β€œI just want my terminal to look cute AND make sense”, and honestly? same. πŸ’–


🎨 Eza Color Explanation 🎨

okay so eza provides its own built-in set of file extension mappings that cover a large range of common file extensions, including documents, archives, media, and temporary files. any mappings in the environment variables will override this default set: running eza with LS_COLORS="*.zip=32" will turn zip files green but leave the colours of other compressed files alone. periodt.

you can also disable this built-in set entirely by including a reset entry at the beginning of EZA_COLORS. so setting EZA_COLORS="reset:*.txt=31" will highlight only text files; setting EZA_COLORS="reset" will highlight nothing. vibe check: reset means reset, bestie. ✨

✨ Examples ✨

  • Disable the β€œcurrent user” highlighting: EZA_COLORS="uu=0:gu=0"
  • Turn the date column green: EZA_COLORS="da=32"
  • Highlight Vagrantfiles: EZA_COLORS="Vagrantfile=1;4;33"
  • Override the existing zip colour: EZA_COLORS="*.zip=38;5;125"
  • Markdown files a shade of green, log files a shade of grey: EZA_COLORS="*.md=38;5;121:*.log=38;5;248"

🌈 BUILT-IN EXTENSIONS 🌈

  • ✨ eza now supports bright colours! as supported by most modern 256-colour terminals, you can now choose from bright colour codes when selecting your custom colours in your #EZA_COLORS environment variable.
  • πŸ› οΈ Build (Makefile, Cargo.toml, package.json) are yellow and underlined.
  • πŸ–ΌοΈ Images (png, jpeg, gif) are purple.
  • 🎬 Videos (mp4, ogv, m2ts) are a slightly purpler purple.
  • 🎡 Music (mp3, m4a, ogg) is a faint blue.
  • πŸ’Ž Lossless music (flac, alac, wav) is a less faint blue.
  • πŸ” Cryptographic files (asc, enc, p12) are bright green.
  • πŸ“„ Documents (pdf, doc, dvi) are a fainter green.
  • πŸ—œοΈ Compressed files (zip, tgz, Z) are red.
  • 🧹 Temporary files (tmp, swp, ~) are dimmed default foreground color.
  • βš™οΈ Compiled files (class, o, pyc) are yellow. a file is also counted as compiled if it uses a common extension and is in the same directory as one of its source files: styles.css will count as compiled when next to styles.less or styles.sass, and scripts.js when next to scripts.ts or scripts.coffee.
  • πŸ“œ Source files (cpp, js, java) are bright yellow.

πŸŽ€ Theme Configuration file πŸŽ€

now you can specify these options and more in a theme.yml file with convenient syntax for defining your styles. <butterfly>obsessed.</butterfly> πŸ¦‹

set EZA_CONFIG_DIR to specify which directory you would like eza to look for your theme.yml file, otherwise eza will look for $XDG_CONFIG_HOME/eza/theme.yml.

These are the available options:

😭 LIST OF THEME OPTIONS 😭

              filekinds:
                normal
                directory
                symlink
                pipe
                block_device
                char_device
                socket
                special
                executable
                mount_point

              perms:
                user_read
                user_write
                user_execute_file
                user_execute_other
                group_read
                group_write
                group_execute
                other_read
                other_write
                other_execute
                special_user_file
                special_other
                attribute

              size:
                major
                minor
                number_byte
                number_kilo
                number_mega
                number_giga
                number_huge
                unit_byte
                unit_kilo
                unit_mega
                unit_giga
                unit_huge

              users:
                user_you
                user_root
                user_other
                group_yours
                group_other
                group_root

              links:
                normal
                multi_link_file

              git:
                new
                modified
                deleted
                renamed
                ignored
                conflicted

              git_repo:
                branch_main
                branch_other
                git_clean
                git_dirty

              security_context:
                none:
                selinux:
                  colon
                  user
                  role
                  typ
                  range

              file_type:
                image
                video
                music
                crypto
                document
                compressed
                temp
                compiled
                build
                source

              punctuation:

              date:

              inode:

              blocks:

              header:

              octal:

              flags:

              control_char:

              broken_symlink:

              broken_path_overlay:

each of those fields/sub fields can have the following styling properties defined beneath it

                  foreground: Blue
                  background: null
                  is_bold: false
                  is_dimmed: false
                  is_italic: false
                  is_underline: false
                  is_blink: false
                  is_reverse: false
                  is_hidden: false
                  is_strikethrough: true
                  prefix_with_reset: false

Example:

              file_type:
                image:
                  foreground: Blue
                  is_italic: true
              date:
                foreground: White

              security_context:
                selinux:
                  role:
                    is_hidden: true

Icons can now be customized as well in the filenames and extensions fields

              filenames:
                # Just change the icon glyph
                Cargo.toml: {icon: {glyph: πŸ¦€}}
                Cargo.lock: {icon: {glyph: πŸ¦€}}

              extensions:
                rs: {  filename: {foreground: Red}, icon: {glyph: πŸ¦€}}

🫢 NOTES 🫢

Note: Not all glyphs support changing colors.
Note: If your theme is not working properly, double check the syntax in the config file, as a syntax issue can cause multiple properties to not be applied.
Note: You must name the file theme.yml, no matter the directory you specify. no cap, the filename matters. 😭

πŸ‘‘ See also πŸ‘‘


okay bestie, that's the whole eza_colors-explanation(5) page β€” source/version: $version. now go make your terminal slay. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from