aboutsummaryrefslogtreecommitdiffstats
path: root/bin/udt-palette
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-05 18:49:28 +0200
committerDanilo M. <danix@danix.xyz>2026-10-05 18:49:28 +0200
commita8f0a5f74cf44cb1877154cf71b5c594bc303b05 (patch)
tree35d80506ba6afe5e7bf4647da36c93a829b5fd49 /bin/udt-palette
parent9c468ffb40f832ff25f23bd6027b93ae8d40c7bf (diff)
downloadunified-desktop-theme-a8f0a5f74cf44cb1877154cf71b5c594bc303b05.tar.gz
unified-desktop-theme-a8f0a5f74cf44cb1877154cf71b5c594bc303b05.zip
feat(accent): GRUB and homepage follow the wallpaper accent
Both sat on the scheme's fixed accent, on the grounds that nothing at boot and nothing on the dashboard host can read the wallpaper. Neither needs to: both are generated here, and both already carry the wallpaper itself, so a wallpaper change already leaves them stale and raises their root steps. Following the accent adds no step. udt-accent rewrites the accent in the generated files before it starts udt-grub and udt-homepage: the accent= value on theme.txt's '# udt:' line, which grub-theme-udt's build reads for its PNG slices, and a single --udt-accent line in homepage's custom.css that every accent rule now reads. Sublime's rewrite moves onto the same helper, which also keeps the file's mode rather than leaving it 0600. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'bin/udt-palette')
-rwxr-xr-xbin/udt-palette18
1 files changed, 10 insertions, 8 deletions
diff --git a/bin/udt-palette b/bin/udt-palette
index cdeb571..86c53d6 100755
--- a/bin/udt-palette
+++ b/bin/udt-palette
@@ -592,7 +592,6 @@ def gen_homepage(res, scheme, palette):
sr, sg, sb, _ = res["surface"]
ar, ag, ab, _ = res["surface_alt"]
br, bg_, bb, _ = res["bg"]
- accent = hex6(res["accent"])
return f"""/* {BANNER.format(scheme=scheme)}
*
@@ -603,7 +602,10 @@ def gen_homepage(res, scheme, palette):
.theme-gray {{
{rows}
- --color-logo-start: {triple('accent')};
+ /* The scheme's accent until udt-accent rewrites this line with the
+ * wallpaper's. Every accent below reads it, so that is one line to match. */
+ --udt-accent: {triple('accent')};
+ --color-logo-start: var(--udt-accent);
--color-logo-stop: {triple('info')};
}}
@@ -622,10 +624,9 @@ def gen_homepage(res, scheme, palette):
background-color: rgb({br} {bg_} {bb} / 50%);
}}
-/* Accent on secondary labels. Fixed, not wallpaper-tracking: this runs on a
- * server with no wallpaper to read. */
+/* Accent on secondary labels. */
.theme-gray .text-theme-500 {{
- color: {accent};
+ color: rgb(var(--udt-accent));
}}
"""
@@ -693,9 +694,10 @@ def gen_conky(res, scheme, palette, template):
def gen_grub(res, scheme, palette, template):
"""GRUB: substitute into the theme template in the grub-theme-udt repo.
- theme.txt has no include, so the colours are baked in. The accent is the
- scheme's fixed one: nothing at boot can read the wallpaper. The PNG slices
- that carry colour are drawn by that repo's build script from this output.
+ theme.txt has no include, so the colours are baked in. The accent lands only
+ on the '# udt:' line, where the build script reads it to draw the PNG
+ slices that carry colour. udt-accent rewrites it there with the wallpaper's,
+ which is no less stale than the background snapshot the build already takes.
"""
out = template.replace("@SCHEME@", scheme)
for role in ("bg", "bg_alt", "bg_deep", "surface", "fg", "fg_dim",