From 7b55910a786c7652ac80a576399ebd9f81a8ac72 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 11 Sep 2026 17:20:50 +0200 Subject: feat(palette): generate every themed config from one scheme 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/.conf holds the colours under the scheme's own names, and palette/roles-.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 Claude-Session: https://claude.ai/code/session_015gbjA2bmswN8jyPDKzrvqe --- palette/roles-tokyo-night.conf | 99 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 palette/roles-tokyo-night.conf (limited to 'palette/roles-tokyo-night.conf') diff --git a/palette/roles-tokyo-night.conf b/palette/roles-tokyo-night.conf new file mode 100644 index 0000000..fb54926 --- /dev/null +++ b/palette/roles-tokyo-night.conf @@ -0,0 +1,99 @@ +# Role assignments for Tokyo Night. +# Copyright (C) 2026 Danilo M. +# Licensed under the GNU General Public License v2 only. +# +# Tokyo Night carries fewer surface depths than Catppuccin, so bg_highlight +# does double duty as both surfaces. Its comment colour is the dim foreground. + +[ui] +bg = bg +bg_alt = bg_dark +bg_deep = bg_float +surface = bg_highlight +surface_alt = bg_visual +border = fg_gutter + +fg = fg +fg_dim = fg_dark +fg_faint = comment + +accent = blue + +[state] +warning = yellow +critical = red +success = green +info = cyan + +[waybar] +main_br = fg_dark +main_bg = bg_dark +main_fg = fg +hover_bg = bg +hover_fg = fg/75 +outline = bg_dark*50 + +workspaces = bg_dark +temperature = bg_dark +memory = bg +cpu = bg_highlight +time = bg_highlight +date = bg +tray = bg_dark +volume = bg_dark +backlight = bg +battery = bg_highlight +charging = green + +[conky] +heading = blue +label = fg_dark +rule = fg_gutter +value = cyan +highlight = magenta +ok = green +body = fg +body_outline = fg_gutter +body_shade = bg_dark + +[terminal] +cursor = orange +selection_bg = bg_visual +selection_fg = fg +url = cyan +tab_active_bg = magenta +tab_active_fg = bg_dark +tab_inactive_bg = bg_dark +tab_inactive_fg = fg +border_active = blue +border_inactive = comment + +black = terminal_black +red = red +green = green +yellow = yellow +blue = blue +magenta = magenta +cyan = cyan +white = fg_dark + +bright_black = comment +bright_red = red1 +bright_green = green1 +bright_yellow = orange +bright_blue = blue5 +bright_magenta = purple +bright_cyan = blue1 +bright_white = fg + +# kitty extras: marks, scrollbar, bell, tab bar ground. +mark1 = blue +mark2 = magenta +mark3 = cyan +scrollbar_handle = comment +scrollbar_track = fg_gutter +bell_border = yellow +tab_bar_bg = bg_dark + +[accents] +snap = magenta purple blue red orange yellow green teal cyan blue1 -- cgit v1.2.3