OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
omarchy-theming low occasional DISPUTE

Fix invisible selections in Neovim, gum prompts and btop with an alacritty-only community theme

omarchythemingneovim
AUDITED Audited against its sources and confirmed accurate. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

omarchy-theme-colors-from-alacritty line 123 on 4.0.4-1 is selection_background=${selection_background:-$foreground} and line 19 exits early when colors.toml exists, so a hand-written colors.toml wins. The script writes $THEME_SOURCE/colors.toml, matching the fix. In omarchy-theme-set, colors.toml is not in INSTALLED_THEME_DENIED, so for a git-installed theme it is staged and stage_installed_colors_from_alacritty (line 158) then skips generation. Templates confirmed: neovim.lua.tpl uses selection/selection_background, gum_env.lua.tpl selection_background/foreground, btop.theme.tpl {{ selection }}. omarchy-theme-color line 229 holds the color8/color0/background fallback that never runs when selection is set. Issue #9266 (open) matches. PR #9270 is open, #9275 and #9287 closed unmerged, so none is in 4.0.4-1 as stated.

Symptom

After omarchy theme install <url> and omarchy theme set <theme>, text I select in Neovim (viw) is unreadable, text on text. The LSP highlight on the word under the cursor is invisible too. In gum confirm prompts such as omarchy plugin add ... --enable, I cannot tell whether Yes or No is highlighted. btop's selected process row disappears.

Cause

The theme ships alacritty.toml without a [colors.selection] block and ships no colors.toml. Omarchy then generates colors.toml with omarchy-theme-colors-from-alacritty, which falls back with selection_background=${selection_background:-$foreground} (line 123 on 4.0.4-1). So the generated file sets selection equal to foreground. Every template that reads {{ selection }} paints the selection in the text color: neovim.lua.tpl, gum_env.lua.tpl and btop.theme.tpl. Because the key is present, omarchy-theme-color's own fallback chain (color8, color0, background) never runs.

Fix

Generate the colors.toml yourself once, then point selection at the theme's color8. The generator skips any theme that already has a colors.toml, so your file wins from then on:


t=~/.config/omarchy/themes/<theme>
omarchy-theme-colors-from-alacritty "$t"          # writes $t/colors.toml
grep -E '^(selection|foreground|color8) ' "$t/colors.toml"
c8=$(sed -n 's/^color8 = "\(.*\)"/\1/p' "$t/colors.toml")
sed -i "s/^selection = .*/selection = \"$c8\"/" "$t/colors.toml"
omarchy theme set <theme>

For a theme installed from git, the new colors.toml is an untracked file in the clone. omarchy theme update could conflict if the author later adds their own colors.toml. If it does, delete yours and update again.

Open Neovim windows and running btop keep the old palette until restarted. Upstream PRs #9270, #9275 and #9287 change the fallback to color8, color0 and background. None of them is in 4.0.4-1.

Verify


grep -E '^(selection|foreground) ' ~/.local/state/omarchy/current/theme/colors.toml

The two values differ, and viw in a new Neovim shows a visible highlight.

Sources

alacritty-only-theme-invisible-selection-highlight