diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-15 11:16:09 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-15 11:16:09 +0200 |
| commit | a9f3e65355b64577044467ca70ca16d00fba016b (patch) | |
| tree | e23ba75ade9be67f194a6535d351f6a8fd9909ae /AGENTS.md | |
| parent | c90c72ed7d5bb5337319a053bf89d73fcb16c604 (diff) | |
| download | unified-desktop-theme-a9f3e65355b64577044467ca70ca16d00fba016b.tar.gz unified-desktop-theme-a9f3e65355b64577044467ca70ca16d00fba016b.zip | |
feat(palette): add Sublime Text as a consumer
Two outputs, not one. The colour scheme themes the editor pane and tracks
the wallpaper accent; the theme themes the UI chrome and sits on the
scheme's fixed accent, because Sublime reads a theme once per window and a
moving accent would leave open windows disagreeing with new ones.
The colour scheme costs no new roles. Its scopes map onto the sixteen ANSI
slots every scheme already declares, so all nine satisfy it and the
identical-role-set selftest passes untouched.
The theme is an override layered over Material Behave rather than a theme
of its own: that theme hardcodes 419 rules of [r,g,b] literals with no
variables, so the chrome surfaces are restated and its geometry, icons and
animations are inherited. It installs under the name of the theme it
overrides, because Sublime merges .sublime-theme files by filename with
Packages/User last; under its own name it would never apply. It also has
to follow Material Behave's material_theme_contrast_mode block and carry
no settings gate, or contrast mode wins.
The accent is replaced by matching the variable's current value rather
than a placeholder: install.sh copies the file out of the repo, so after
the first wallpaper change there is no placeholder left to substitute.
udt-accent --selftest now covers that it stays idempotent.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 41 |
1 files changed, 35 insertions, 6 deletions
@@ -6,7 +6,8 @@ Guidance for agents working in this repository. One visual identity for a Hyprland desktop: Catppuccin Macchiato, Noto Sans for UI text, Inconsolata Nerd Font Mono for monospace. It covers rofi, dunst, -Hyprland window borders, conky, Qt5/Qt6, GTK3/GTK4, waybar, kitty and neovim. +Hyprland window borders, conky, Qt5/Qt6, GTK3/GTK4, waybar, kitty, Sublime Text +and neovim. The repo holds the canonical copies. `./install.sh` symlinks them into place, so the working config cannot drift from what is committed. Everything outside @@ -40,7 +41,24 @@ switch into a diff. Editing one is pointless: the next install overwrites it. The generated set is `rofi/udt/palette.rasi`, `templates/dunstrc`, `templates/conky.conf`, `templates/waybar/theme.css`, `templates/terminal/kitty-theme.conf`, `templates/homepage/custom.css`, -`templates/kvantum/theme.{kvconfig,svg}` and `bin/udt_colors.py`. +`templates/kvantum/theme.{kvconfig,svg}`, +`templates/sublime/udt.sublime-color-scheme`, +`templates/sublime/udt.sublime-theme` and `bin/udt_colors.py`. + +Sublime is two outputs, not one. The **colour scheme** is the editor pane and +tracks the wallpaper accent. The **theme** is the UI chrome, and is an override +layered over Material Behave: that theme hardcodes 419 rules of `[r,g,b]` +literals with no variables, so the chrome surfaces are restated rather than +remapped, and its geometry and icons are inherited untouched. Its accent is +fixed, because Sublime reads a theme once per window. + +**The theme installs under the name of the theme it overrides**, `Material +Behave.sublime-theme`, because Sublime merges `.sublime-theme` files by filename +across packages with `Packages/User` last. Installed as `udt.sublime-theme` it +would be an unselected theme that never applies. It also has to come after +Material Behave's own `material_theme_contrast_mode` block, which re-tints the +sidebar and status bar, and carry no settings gate of its own, or contrast mode +wins. Removing the Materialize package leaves the override inert. Qt and GTK apps reach the palette through Kvantum. Its theme is a `.kvconfig` of colours plus a `.svg` of widget artwork with the colours baked into the @@ -95,10 +113,19 @@ One colour moves: `@accent`. `bin/udt-accent` reads the current wallpaper, extracts its signature colour, and snaps it to the nearest of ten Catppuccin accents by perceptual hue in CIELAB. `wallp` calls it on every wallpaper change. -It writes five things: `~/.cache/wal/udt-accent.rasi` (rofi), +It writes six things: `~/.cache/wal/udt-accent.rasi` (rofi), `~/.cache/wal/udt-border.lua` (Hyprland), the accent substitution in `~/.cache/wal/dunstrc`, `~/.cache/wal/colors.json` (Firefox, via -pywalfox), and `~/.cache/wal/udt-palette.qml` (quickshell). +pywalfox), `~/.cache/wal/udt-palette.qml` (quickshell), and the accent +substitution in Sublime's installed +`Packages/User/udt.sublime-color-scheme`. + +**Sublime's accent is replaced, not substituted into a placeholder.** Its +colour scheme cannot cascade, so the accent has to live in the one generated +file rather than arriving as a second one, and `install.sh` copies that file +out of the repo. `write_sublime` therefore rewrites the `"accent"` variable +line by matching its current value, which makes it idempotent across +wallpaper changes; a placeholder would survive only the first run. The QML palette is the one output that is not only the accent: it carries the whole structural palette too, parsed out of `rofi/udt/palette.rasi` @@ -123,8 +150,9 @@ the terminal palette stays fixed no matter what the wallpaper looks like. The write lands after `wallp` has already run `wal --theme`, so it wins; reorder those two and pywal's wallpaper-derived colours come back. -Not everything tracks the wallpaper. rofi, dunst, Hyprland borders and Firefox -do; conky, Qt, GTK and waybar sit on fixed lavender, which is also the fallback +Not everything tracks the wallpaper. rofi, dunst, Hyprland borders, Sublime's +colour scheme and Firefox do; conky, Qt, GTK, waybar and Sublime's UI chrome sit +on fixed lavender, which is also the fallback when a wallpaper is too grey to snap. Qt and GTK apps only reread a theme on restart, so a moving accent there would leave running apps disagreeing with new ones. @@ -206,5 +234,6 @@ The table is what it does, and what to run if you change a config by hand. | Hyprland | `hyprctl reload` | | waybar | `killall -SIGUSR2 waybar` | | kitty | `pkill -USR1 -x kitty` | +| Sublime Text | nothing; it watches `Packages/User` and reloads both the scheme and the theme | | conky | restart it; no hot-reload | | Qt / GTK apps | restart the app | |
