Repository navigation
Preview legacy themes that only have alacritty.toml - #19481
ThePrimeagen wants to merge 4 commits into
Conversation
resolve_colors_file only looked for colors.toml, so a theme with only alacritty.toml - listed by theme list and applied by theme set - was reported as not found. Add the same fallback theme set uses: recover a palette from alacritty.toml via omarchy-theme-colors-from-alacritty, generated in a scratch directory so the theme itself is not written to. This covers preview by user-theme name, by theme directory path, and by stock-theme name, while existing colors.toml files keep precedence.
[Low impact] The PR appears safe to merge; the stock legacy-theme lookup is restored. SummaryAdds previews for legacy themes that have only
The previous stock-theme lookup finding is fixed. No new actionable issues were found. Reviews (4) · Last reviewed commit: "Preview a stock theme that has only alac..." · Reviewed by Greptile |
|
I read the preview resolver, palette converter, theme-set integration, existing CLI tests, and review comments at Reviewed by GPT-6 High in Codex. No second opinion on the code was requested because classification stopped the review. |
|
GPT-6 High in Codex read the updated resolver, palette converter, regression-test diff, and review discussion at |
The conversion needs somewhere private to write, and making that inside resolve_colors_file meant the function could no longer print its answer: it had to set a global so the main shell knew what to clean up, which rewrote every branch of it. Making the directory once, before the lookup, lets the function stay as it was with three branches added, and the lookup keeps quattro's single loop, which already tries the exact name first. A theme whose alacritty.toml cannot be converted is now reported as not found rather than falling through to a bundled theme spelled alike, which is what omarchy-theme-set does with that folder. The File line says the palette was generated instead of naming a temporary file that is gone when the command returns. No bundled theme ships an alacritty.toml, so that branch is dropped. The tests keep the two ways in, by directory and by name, and check once that the theme folder and the temp directory are left as they were. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Co-Authored-By: Opus 5.5 High <noreply@anthropic.com> Co-Authored-By: Muse Wonder High <noreply@meta.com>
omarchy-theme-set generates a palette for a theme under $OMARCHY_PATH/themes the same way it does for one under ~/.config/omarchy/themes, and the preview is there to show what it would apply. No theme Omarchy ships is in that state today, so this keeps the two in step rather than fixing something seen. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Reviewed by Claude Fable 5.2 at The gap is real on quattro. A theme with an The change was right but about three times the size it needed, so I pushed
On the worker Second opinion: Opus 5.5 High and muse-wonder (thinking high) each read it three times. The first round found no bug in the original but both described this smaller shape and said it was worth having, and both raised the Greptile scores this head 5/5 and its four findings are answered in their threads. This is unrelated to the pull requests about empty or missing colours in |
omarchy dev theme-previewsaysTheme not foundfor a legacy theme that has onlyalacritty.toml, even thoughomarchy theme listshows it andomarchy theme setapplies it. The preview inbin/omarchy-dev-theme-previewonly looks forcolors.tomland never recovers a palette fromalacritty.tomllikeomarchy-theme-setdoes.Screenshots
Reproduce
Meta+Enterto open a terminal.mkdir -p ~/.config/omarchy/themes/OldAlacritty/backgrounds && printf '%s\n' '[colors.primary]' 'background = "#1a1b26"' 'foreground = "#a9b1d6"' '' '[colors.normal]' 'black = "#1a1b26"' 'red = "#f7768e"' 'green = "#9ece6a"' 'yellow = "#e0af68"' 'blue = "#7aa2f7"' 'magenta = "#ad8ee6"' 'cyan = "#449dab"' 'white = "#a9b1d6"' '' '[colors.bright]' 'black = "#414868"' 'red = "#ff7a93"' 'green = "#b9f27c"' 'yellow = "#ff9e64"' 'blue = "#7da6ff"' 'magenta = "#bb9af7"' 'cyan = "#0db9d7"' 'white = "#c0caf5"' > ~/.config/omarchy/themes/OldAlacritty/alacritty.tomlomarchy dev theme-preview OldAlacrittyTheme not found: OldAlacritty, even though the theme folder and itsalacritty.tomlare present.More cases
Preview by theme directory path
Preview by name for a legacy stock theme
Related
alacritty.tomlfallback for legacy themes withoutcolors.tomlthatomarchy theme setalready uses