aboutsummaryrefslogtreecommitdiffstats
path: root/bin/udt-accent
AgeCommit message (Collapse)AuthorFilesLines
2026-09-16refactor(cache): move the generated files to ~/.cache/udtDanilo M.1-5/+11
They lived in ~/.cache/wal because pywal owned that directory and udt-accent was written alongside a pywal run. Nothing on this desktop invokes pywal any more: the wal binary is unused, and udt-accent imports pywal.backends.colorz as a quantisation library, which writes nothing. Sharing the cache only left the ownership ambiguous. colors.json is the one file that cannot move. pywalfox hardcodes <cache>/wal/colors.json and honours only XDG_CACHE_HOME, which would relocate every cache on the system, so udt-accent writes the real file to ~/.cache/udt and install.sh symlinks the old path at it. ~/.cache/wal now holds that link and nothing else. Consumers repointed here: install.sh, udt-accent, launcher.rasi's @WPAPER@. Outside the repo, wallp, Hyprland's look_and_feel.lua and quickshell's shared/Theme.qml move with it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16refactor(dunst): drop dunst as a consumer, quickshell presents nowDanilo M.1-31/+5
dunst no longer runs on this desktop. notifyd owns org.freedesktop.Notifications and the quickshell notifications shell draws the balloons, reading the palette from ~/.cache/wal/udt-palette.qml like every other quickshell component. So the whole dunst path was generating a config nothing read. It was also actively wrong. pywal rendered ~/.cache/wal/dunstrc from the installed template, then wal.sh restarted dunst on it while @ACCENT@ was still an unsubstituted placeholder, and udt-accent restarted it a second time after substituting. Two restarts per wallpaper change, the first on a broken config, for a daemon that could not claim the bus name anyway. Removes gen_dunst and its TARGETS entry, write_dunst and DUNSTRC, the install block, templates/dunstrc.in and the gitignore entry. The reload table now lists quickshell, which needs no signal: it watches the generated palette and re-reads it in place. The [state] roles stay. They were never dunst-only; waybar module states and conky warnings use the same four. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15feat(palette): add Sublime Text as a consumerDanilo M.1-0/+38
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>
2026-09-11fix(accent): make udt-accent scheme-independentDanilo M.1-6/+17
Two things still assumed Catppuccin. The QML header hardcoded "Catppuccin Macchiato" regardless of the scheme in use, and the selftest asserted that an orange input snaps to a colour named "peach", which is true only under Catppuccin: Tokyo Night calls that hue "orange" and the test failed the moment the scheme changed. The header now names the scheme it generated from. The snapping assertions test the property instead of the spelling: an input must land within 0.6 rad of its own hue, and a border neighbour must sit nearer the accent than its opposite. Both hold under any palette. Verified: --selftest passes under macchiato, tokyo-night, nord and dracula. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gbjA2bmswN8jyPDKzrvqe
2026-09-11feat(palette): generate every themed config from one schemeDanilo M.1-37/+12
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
2026-09-11refactor(accent): resolve the wallpaper path, finish the atomic-write helperDanilo M.1-30/+7
colors.json recorded whatever path it was handed, so it read either the real wallpaper or ~/.cache/wal/wpaper, the symlink to it, depending on the caller. wallp passes the resolved file; a manual run usually passes the symlink. Same wallpaper either way, so record one spelling. write_atomic arrived with the quickshell palette but only write_border used it. The other four writers kept their own copy of the same write-then-rename, which is the duplication the helper was added to remove, so they use it now. No behaviour change: the temp file was already created by mkstemp in every case, so the resulting modes are the same. Verified by running the script before and after: udt-palette.qml, udt-accent.rasi and udt-border.lua are byte-identical, and colors.json differs only in the wallpaper field this commit intends to change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gbjA2bmswN8jyPDKzrvqe
2026-09-11feat(accent): generate a QML palette for quickshellDanilo M.1-9/+86
udt-accent now writes ~/.cache/wal/udt-palette.qml alongside the accent, border and colors.json it already produced. Quickshell components read it and watch it, so editing the palette here recolours a running shell without restarting it. Unlike the other outputs this one is not only the accent: it carries the structural colours too. Those are parsed out of rofi/udt/palette.rasi rather than restated in the script, so that file stays the single place the Macchiato values are written down. Hardcoding them a second time here is exactly the drift this is meant to remove: the quickshell components each had their own copy before this. The atomic write that write_border already did by hand is now a helper, write_atomic, used by both. Every generated file is watched by something, and a torn read shows up as a theme that briefly loses its colours. colors.json is untouched by this change, verified by running the script before and after and comparing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G7NRsGyF9jGfPYS4zPqpN7
2026-09-11feat: theme Firefox from the accent via pywalfoxDanilo M.1-0/+55
udt-accent now rewrites ~/.cache/wal/colors.json as a fixed Catppuccin Macchiato palette with the wallpaper's accent in the cursor and the two highlight slots, then runs `pywalfox update`. colors.json is the only file pywalfox reads, so this is the only way Firefox can follow the accent. Overwriting it wholesale costs nothing: wallp already rewrote it moments earlier via `wal --theme`, and nothing else consumes it. kitty reads its own current-theme.conf, so the terminal palette is unaffected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015gbjA2bmswN8jyPDKzrvqe
2026-09-11feat: unify Qt5, Qt6 and GTK on Macchiato with a lavender accentDanilo M.1-6/+10
Installs the upstream Catppuccin Kvantum and GTK themes and points all four toolkits at them. Qt5 and Qt6 previously disagreed with each other as well as with the desktop: qt5ct carried a hand-rolled grey/purple palette and qt6ct used the stock darker.conf. Both now take their palette from Kvantum. Two things were not where they looked. GTK3's theme comes from gsettings on Wayland, not settings.ini, and gsettings was pinned to Breeze, which silently overrode the file; its icon-theme was likewise on breeze-dark while settings.ini said Material-Black-Plum-Suru. GTK4 ignores gtk-theme-name entirely, so its stylesheet is symlinked into ~/.config/gtk-4.0 instead. The accent is fixed rather than wallpaper-tracking, since Qt and GTK apps only reread a theme on restart. Lavender also replaces mauve as udt-accent's fallback so everything without a wallpaper-derived accent agrees. catppuccin/gtk is archived upstream. v1.0.3 works today but will not track future libadwaita changes; it is removable by deleting the directory. The tracked qt5ct/qt6ct files carry only the theme-relevant keys: the live files also hold an ignored_applications list of local paths. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G6aeE37K4GHBsaM51yLTTq
2026-09-11feat: theme dunst in Macchiato with a wallpaper-driven accent frameDanilo M.1-0/+34
Notifications previously drew their colours from the pywal preset, so they were pure black on white and did not match anything else. Structural colours are now fixed Macchiato, with the accent as the frame on normal urgency, a muted surface frame on low, and Macchiato red on critical. Font moves to Noto Sans to match the rest of the desktop. udt-accent substitutes the accent after pywal renders the template, then restarts dunst so it rereads the file. It restarts rather than just killing: nothing else respawns dunst, and a dead dunst means no notifications at all. Also fixes a dangling reference: the template pointed dunst's dmenu at darknix/main.rasi, a theme that no longer exists. The template is tracked here as templates/dunstrc; the live copy is ~/.config/wal/templates/dunstrc. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G6aeE37K4GHBsaM51yLTTq
2026-09-11feat: drive the Hyprland border gradient from the wallpaper accentDanilo M.1-1/+55
Replaces the six-stop RGB rainbow with the current accent plus its two neighbours on the perceptual hue wheel. The borderangle animation rotates a gradient, so it needs more than one colour to show motion; neighbouring hues keep that motion legible without leaving the palette. Emitted as Lua rather than a .conf snippet. Hyprland's Lua parser refuses hyprctl keyword ("keyword can't work with non-legacy parsers") and has no source directive, so look_and_feel.lua reads the generated table with dofile() and falls back to a fixed Macchiato triple when it is absent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G6aeE37K4GHBsaM51yLTTq
2026-09-11feat: extract wallpaper accent without touching the pywal cacheDanilo M.1-0/+58
Calls pywal.backends.colorz.get() directly rather than running `wal -i`. That function returns a list and writes nothing, so the preset-driven cache that kitty, dunst and neovim read is left alone. `wal -i` has no isolation flag and would rewrite all of ~/.cache/wal, reintroducing the unreadable-terminal problem the preset was adopted to fix. Writes atomically, so a rofi launch concurrent with a wallpaper change cannot read a half-written theme. A missing or broken image falls back to mauve rather than leaving no accent at all. Verified across six wallpapers with colors.json byte-identical afterward. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G6aeE37K4GHBsaM51yLTTq
2026-09-11feat: add perceptual hue matching for Macchiato accentsDanilo M.1-0/+101
Matches in CIELAB rather than HLS: HLS hue is not perceptually uniform and mismatched obvious cases during prototyping, snapping orange to yellow and saturated red to flamingo. The candidate set is nine, not all fourteen. rosewater and flamingo are near-neutral tints that carry a hue angle but almost no chroma, so they captured saturated inputs; maroon, sapphire and lavender duplicate the hues of red, sky and mauve without adding visible range. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G6aeE37K4GHBsaM51yLTTq