# yazi-gruvbox A [Gruvbox Dark](https://github.com/morhetz/gruvbox) `theme.toml` for [Yazi](https://github.com/sxyazi/yazi) — including the **icon table**, so the devicons in front of your files stop looking like a paint spill on an otherwise muted colour scheme. Written against **Yazi 26.9**. It uses the current schema (`[mgr]`, `[tabs]`, `[pick]`, `[cmp]`, `[indicator]`, …), not the pre-25.x one — older Gruvbox themes floating around still use `[manager]` and `[select]` and will throw errors on a current Yazi. ## What it covers Panel chrome, status bar, tabs, mode indicator, which-key, confirm/spot/notify popups, picker, input, completion, task manager, help — plus: **File and directory names** (`[filetype]`): | | | |---|---| | directories | `#83a598` blue | | regular files | `#ebdbb2` fg1 | | executables | `#b8bb26` green | | archives | `#fe8019` orange | | images | `#fabd2f` yellow | | audio / video | `#d3869b` purple | | PDF / doc | `#8ec07c` aqua | | orphan symlinks | red background | **Icons** (`[icon]`): all 725 entries of Yazi's preset table, every glyph colour remapped to its nearest Gruvbox tone. ## How the icon colours were derived Yazi's preset ships 725 icon entries using 221 distinct colours from the nvim-tree/devicons palette — saturated web colours that clash badly with Gruvbox's muted ground. `regen-icons.py` maps each of them onto the Gruvbox palette: - **Nearest neighbour in Oklab**, so the match is perceptual rather than a naive RGB distance. - **Lightness weighted down (0.7)** in the distance metric, so *hue* drives the result. Docker blue stays blue, Ruby red stays red, instead of everything collapsing toward whatever tone happens to be equally bright. - **Chromatic and greyish sources are matched from separate pools** (split at Oklab chroma 0.04). Without that split a vivid magenta can land on grey, and white can land on orange. - **Low-contrast targets are excluded.** `#cc241d` (2.69:1) and `#7c6f64` (3.03:1) on `#282828` were dropped from the target palette — icons are non-text, so 3:1 is the bar. The dimmest icon now sits at **3.48:1**. 221 colours end up on 19 Gruvbox tones. Icons stay colourful and stay distinguishable; they just stop shouting. ## Install ```sh git clone https://git.opennerds.org/templis/yazi-gruvbox cp yazi-gruvbox/theme.toml ~/.config/yazi/theme.toml ``` `theme.toml` overrides Yazi's built-in `theme-dark.toml`; anything it does not set keeps the default. ### Optional: Gruvbox syntax highlighting in previews Not shipped here — the usual Gruvbox `.tmTheme` for Yazi is AGPL-3.0 and would pull this repository along with it (see `THIRD-PARTY.md`). To get it: ```sh curl -o ~/.config/yazi/Gruvbox-Dark.tmTheme \ https://raw.githubusercontent.com/poperigby/gruvbox-dark-yazi/main/Gruvbox-Dark.tmTheme ``` Then uncomment in `theme.toml`: ```toml [mgr] syntect_theme = "~/.config/yazi/Gruvbox-Dark.tmTheme" ``` ## Keeping the icon table current The `[icon]` block **replaces** Yazi's preset table wholesale. Icons added by later Yazi releases will not show up until it is regenerated: ```sh git clone --depth 1 https://github.com/sxyazi/yazi awk '/^\[icon\]/{f=1} f' yazi/yazi-config/preset/theme-dark.toml > icons-src.toml ./regen-icons.py icons-src.toml # writes icon-gruvbox.toml ``` Then replace the `[icon]` block in `theme.toml` with the generated file. The script prints which Gruvbox tone each source colour landed on. ## Licence MIT — see `LICENSE`. Derived icon data is MIT as well; notices in `THIRD-PARTY.md`.