|
Colours were written down five times: rofi's palette.rasi, the waybar theme,
the kitty theme, the conky and dunst templates, and a MACCHIATO dict inside
udt-accent. Changing scheme meant finding all five, and they had already
drifted: the active waybar theme was Macchiato while theme.css next to it was
Mocha, and nothing imported the latter.
Now a scheme is two files. palette/<scheme>.conf holds the colours under the
scheme's own names, and palette/roles-<scheme>.conf says what each is for.
palette/roles.conf is one `scheme =` line selecting the pair. bin/udt-palette
renders that into each consumer's syntax and install.sh runs it first.
The role map is per-scheme rather than shared because the palettes are
genuinely different shapes: Nord has no `base`, Dracula no `surface0`, and
forcing Catppuccin's names onto them would have meant either renaming their
colours or inventing values. A role names a palette colour with two optional
modifiers, `name/75` for alpha and `name*50` for brightness. The second exists
because GTK's shade() has no palette name to point at.
Ships macchiato, tokyo-night, nord and dracula. --selftest resolves every role
in every scheme and asserts they define the same set, so a scheme that cannot
satisfy a consumer fails at install rather than when someone switches to it.
Verified against the live configs: all 46 waybar colours resolve identically to
the previously active theme including its alpha() and shade() derivations, the
kitty theme is colour-for-colour identical, and the rofi palette has the same
26 values. Generated files are gitignored; switching scheme and switching back
reproduces the originals.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015gbjA2bmswN8jyPDKzrvqe
|
|
These were deliberately left until last: wallpaper-derived colours in kitty's
ANSI slots were the original readability problem, since nothing in a wallpaper
guarantees color4 stays legible against color0. A hand-tuned palette is safe for
the opposite reason, so the move is onto Macchiato rather than back onto pywal.
current-theme.conf was a symlink into the wal cache and is now a real file.
wal.sh no longer recreates that symlink, which would have silently reverted the
theme on the next wallpaper change.
Neovim read the same pywal output via colorscheme pywal and now uses the
catppuccin/nvim plugin. Its airline theme was base16_dracula, matching nothing;
it is now base16, which derives from the active colorscheme.
Measured before committing: every ANSI slot clears 4.5:1 against its own
background in both themes except color0, which is the near-background slot in
both. color8, used by some colourschemes for comments, does drop from 3.83:1 to
2.38:1, but the Catppuccin neovim plugin sets its own comment colour rather than
using ANSI 8, confirmed on screen.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6aeE37K4GHBsaM51yLTTq
|