Files
ricing/kitty
nico 63a56f4a01 Theme presets, and make the bar itself actually re-theme (colors + opacity)
Presets (theme/presets.py): named snapshots of the whole palette, saved/loaded/
deleted from a new bookmark button on the theme widget. Stored outside the
repo in ~/.local/share/quickshell/theme-presets/ (JSON, per-machine data, same
precedent as the wallpaper history). A built-in Default entry can't be
overwritten or deleted.

Wiring that up exposed a real gap: the bar's own colors were hand-matched
hardcoded QML literals, not actually driven by theme/colors.toml, and opacity
wasn't themeable anywhere yet. Fixed both:
- colors.toml gains bar_color/pill_color/popup_color (paired with the existing
  *_opacity floats) plus generic opacity support in render.py (--set now
  accepts a 0-1 float, not just #rrggbb)
- Bar.qml now fetches the palette via render.py --dump and rebinds every
  matching hardcoded hex literal (accent, foreground, color1/2/3/5/6/8/12,
  the bar/pill/popup backgrounds, the logo tint and the bar's bottom border)
  to it; kitty's background_opacity is template-driven instead of a second
  hardcoded line fighting the themed one
- both the bar and the widget listen on their own Quickshell IPC target
  (render.py/presets.py ping both after every change) so edits reload with no
  restart, matching the "instant" promise the color editor already had
- the theme widget's color popup gained a slider + matching color swatch per
  surface (Bar/Pills/Popups/Terminal) below the existing role list, and its
  role labels now say what each color actually paints instead of "Color N"
  (verified against the templates and Bar.qml's literals, not guessed) with
  unused roles honestly marked as such
- the CPU pill's icon color is deliberately hardcoded again after this -
  it coincidentally shared color12's hex value with the help icon/detail
  text, so theming color12 was recoloring it too

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dujsk9jYfxUVLtb5B8eC94
2026-09-28 22:45:09 +02:00
..