Skip to content

Fall back selection to color8 when alacritty has no selection block - #9275

Open
fresh3nough wants to merge 1 commit into
omacom:quattrofrom
fresh3nough:fix/issue-9266-selection-fallback
Open

Fall back selection to color8 when alacritty has no selection block#9275
fresh3nough wants to merge 1 commit into
omacom:quattrofrom
fresh3nough:fix/issue-9266-selection-fallback

Conversation

@fresh3nough

Copy link
Copy Markdown

Summary

Fixes #9266.

omarchy-theme-colors-from-alacritty fell back to $foreground when a theme had no [colors.selection] block. That value was written into colors.toml as selection, which then beat omarchy-theme-color's own cascade (selection -> selection_background -> color8 -> color0 -> background). Neovim Visual/LSP highlights, gum prompts, and btop selected rows all rendered as invisible text-on-text.

Change

Use the same muted cascade omarchy-theme-color already uses:

selection_background=${selection_background:-${color8:-${color0:-$background}}}

Test plan

  • Reproduced on GCP VM: theme with no [colors.selection] generated selection == foreground (#cdd6f4)
  • After fix: same theme generates selection == color8 (#585b70)
  • Explicit [colors.selection].background still wins
  • test/shell.d/theme-colors-from-alacritty-test.sh passes
./test/shell.d/theme-colors-from-alacritty-test.sh

Themes installed without colors.toml and without [colors.selection] were
getting selection == foreground from omarchy-theme-colors-from-alacritty,
which locked every {{ selection }} consumer into invisible text-on-text
highlights. Use the same muted cascade as omarchy-theme-color.

Fixes omacom#9266

Signed-off-by: fresh3nough <anonwurcod@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloned theme without [colors.selection] gets selection == foreground (invisible highlights)

1 participant