aboutsummaryrefslogtreecommitdiff
path: root/scripts/hypr-live-update-guard
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-11 23:36:51 -0500
committerCraig Jennings <c@cjennings.net>2026-07-11 23:36:51 -0500
commit440877965e8879f3c9567cf923b7c65c0eee227c (patch)
tree86d10cc52d87aef2e3f5234a35ba327bf81479d3 /scripts/hypr-live-update-guard
parent18d4b33e9338fac2a316f51a479574db07d7cedc (diff)
downloadarchsetup-440877965e8879f3c9567cf923b7c65c0eee227c.tar.gz
archsetup-440877965e8879f3c9567cf923b7c65c0eee227c.zip
refactor(gallery): extract design tokens to one source for 3 targets
The colors, glows, gradient ramp, and pulse rate were hardcoded literals scattered across ~40 sites in the gallery. Retuning the amber meant a find-and-replace through the whole file. I pulled them into tokens.json as the single source. gen_tokens.py reads that source and emits three targets: web CSS custom properties (into the gallery :root, between markers), waybar GTK @define-color declarations, and an elisp alist for the future svg.el renderer. The three genuinely differ (CSS --vars with rgb-triple glows, GTK @define-color with underscore names, elisp hex alist), which is why one generator beats three hand-maintained copies. The amber hue is defined once, and its glow triples are derived from the hex, so retuning it means editing one line and rerunning the generator. The gallery render is unchanged. I verified it pixel-identical against the prior commit with reduced-motion forced and the live clock masked (diff of 0). Tests cover hex conversion, the three emitters, marker replacement, and idempotency: 27 tests, 100% line coverage, wired into make test-unit.
Diffstat (limited to 'scripts/hypr-live-update-guard')
0 files changed, 0 insertions, 0 deletions