aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-27 18:23:03 +0200
committerDanilo M. <danix@danix.xyz>2026-09-27 18:23:03 +0200
commit154bb069476e9e3a438b76774a739e980b49494e (patch)
tree4c82e4cd7f15f40e08bd11a1749f44d910aa2abf
parent0a05e36fe5912ac6f26f2c3ecea84c8b29a3fc8a (diff)
downloadunified-desktop-theme-154bb069476e9e3a438b76774a739e980b49494e.tar.gz
unified-desktop-theme-154bb069476e9e3a438b76774a739e980b49494e.zip
feat(palette): add a translucent scrim role for fullscreen overlays
The power menu's ground was a hardcoded rgba(36, 39, 58, 0.88), Macchiato's base, so every other scheme drew its overlay with a Macchiato tint. Each roles file now defines scrim as its own background at 88% alpha, udt-palette emits it into palette.rasi, and powermenu.rasi uses @scrim. scrim is the first translucent palette entry, so udt-accent's QML palette no longer drops the alpha pair: an opaque colour still goes out as #rrggbb, a translucent one as QML's #aarrggbb. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rwxr-xr-xbin/udt-accent9
-rwxr-xr-xbin/udt-palette2
-rw-r--r--palette/roles-candy-night.conf4
-rw-r--r--palette/roles-dracula.conf4
-rw-r--r--palette/roles-frappe.conf4
-rw-r--r--palette/roles-macchiato.conf4
-rw-r--r--palette/roles-material-darker.conf4
-rw-r--r--palette/roles-material-ocean.conf4
-rw-r--r--palette/roles-material-palenight.conf4
-rw-r--r--palette/roles-mocha.conf4
-rw-r--r--palette/roles-nord.conf4
-rw-r--r--palette/roles-tokyo-night.conf4
-rw-r--r--rofi/udt/powermenu.rasi6
13 files changed, 50 insertions, 7 deletions
diff --git a/bin/udt-accent b/bin/udt-accent
index e366bb1..72d3a64 100755
--- a/bin/udt-accent
+++ b/bin/udt-accent
@@ -242,9 +242,9 @@ def write_hyprlock_border(name):
def read_palette():
"""Parse palette.rasi into {name: "#rrggbb"}.
- rofi writes colours as #rrggbbaa; QML wants #rrggbb, and every entry in
- that file is fully opaque, so the alpha pair is dropped rather than
- converted. Returns an empty dict if the file is missing, which leaves the
+ rofi writes colours as #rrggbbaa; QML wants #rrggbb, or #aarrggbb when
+ translucent. Only scrim is, so an opaque alpha pair is dropped and any
+ other is moved to the front. Returns an empty dict if the file is missing, which leaves the
QML palette to fall back to its own defaults.
"""
try:
@@ -254,7 +254,8 @@ def read_palette():
found = {}
for key, value in re.findall(r"(\w+):\s*#([0-9a-fA-F]{6,8})\s*;", text):
- found[key] = "#" + value[:6]
+ alpha = value[6:].lower()
+ found[key] = "#" + (alpha if alpha not in ("", "ff") else "") + value[:6]
return found
diff --git a/bin/udt-palette b/bin/udt-palette
index f603899..234d97a 100755
--- a/bin/udt-palette
+++ b/bin/udt-palette
@@ -151,6 +151,8 @@ ROFI_NAMES = [
# the active border, which is magenta under candy-night; termblue is the
# terminal's blue, a real blue in every scheme but Dracula, which has none.
("peach", "peach"), ("mauve", "highlight"), ("termblue", "blue"),
+ # The one translucent entry: the fullscreen overlays' ground.
+ ("scrim", "scrim"),
]
diff --git a/palette/roles-candy-night.conf b/palette/roles-candy-night.conf
index c3fc514..58bb7a6 100644
--- a/palette/roles-candy-night.conf
+++ b/palette/roles-candy-night.conf
@@ -16,6 +16,10 @@ surface = surface
surface_alt = selection
border = gutter
+# The translucent ground behind a fullscreen overlay (power menu, screenshot
+# menu): the background, faded so the session shows through.
+scrim = background/88
+
fg = foreground
fg_dim = light
fg_faint = comment
diff --git a/palette/roles-dracula.conf b/palette/roles-dracula.conf
index 4ff2485..26ca7a7 100644
--- a/palette/roles-dracula.conf
+++ b/palette/roles-dracula.conf
@@ -14,6 +14,10 @@ surface = surface_mid
surface_alt = current_line
border = current_line
+# The translucent ground behind a fullscreen overlay (power menu, screenshot
+# menu): the background, faded so the session shows through.
+scrim = background/88
+
fg = foreground
fg_dim = comment
fg_faint = surface_high
diff --git a/palette/roles-frappe.conf b/palette/roles-frappe.conf
index dec2879..2fc4704 100644
--- a/palette/roles-frappe.conf
+++ b/palette/roles-frappe.conf
@@ -14,6 +14,10 @@ surface = surface0
surface_alt = surface1
border = surface1
+# The translucent ground behind a fullscreen overlay (power menu, screenshot
+# menu): the background, faded so the session shows through.
+scrim = base/88
+
# Text, brightest to dimmest.
fg = text
fg_dim = subtext0
diff --git a/palette/roles-macchiato.conf b/palette/roles-macchiato.conf
index aa34d7b..dcbe493 100644
--- a/palette/roles-macchiato.conf
+++ b/palette/roles-macchiato.conf
@@ -14,6 +14,10 @@ surface = surface0
surface_alt = surface1
border = surface1
+# The translucent ground behind a fullscreen overlay (power menu, screenshot
+# menu): the background, faded so the session shows through.
+scrim = base/88
+
# Text, brightest to dimmest.
fg = text
fg_dim = subtext0
diff --git a/palette/roles-material-darker.conf b/palette/roles-material-darker.conf
index bfbe8ae..4d5d50f 100644
--- a/palette/roles-material-darker.conf
+++ b/palette/roles-material-darker.conf
@@ -14,6 +14,10 @@ surface = surface
surface_alt = selection
border = mid_high
+# The translucent ground behind a fullscreen overlay (power menu, screenshot
+# menu): the background, faded so the session shows through.
+scrim = background/88
+
fg = foreground
fg_dim = light
fg_faint = comment
diff --git a/palette/roles-material-ocean.conf b/palette/roles-material-ocean.conf
index 3e89c46..d3bf906 100644
--- a/palette/roles-material-ocean.conf
+++ b/palette/roles-material-ocean.conf
@@ -14,6 +14,10 @@ surface = surface
surface_alt = selection
border = mid_high
+# The translucent ground behind a fullscreen overlay (power menu, screenshot
+# menu): the background, faded so the session shows through.
+scrim = background/88
+
fg = foreground
fg_dim = light
fg_faint = comment
diff --git a/palette/roles-material-palenight.conf b/palette/roles-material-palenight.conf
index 22edb5a..de42201 100644
--- a/palette/roles-material-palenight.conf
+++ b/palette/roles-material-palenight.conf
@@ -14,6 +14,10 @@ surface = surface
surface_alt = selection
border = mid_high
+# The translucent ground behind a fullscreen overlay (power menu, screenshot
+# menu): the background, faded so the session shows through.
+scrim = background/88
+
fg = foreground
fg_dim = light
fg_faint = comment
diff --git a/palette/roles-mocha.conf b/palette/roles-mocha.conf
index 395955a..389d89d 100644
--- a/palette/roles-mocha.conf
+++ b/palette/roles-mocha.conf
@@ -14,6 +14,10 @@ surface = surface0
surface_alt = surface1
border = surface1
+# The translucent ground behind a fullscreen overlay (power menu, screenshot
+# menu): the background, faded so the session shows through.
+scrim = base/88
+
# Text, brightest to dimmest.
fg = text
fg_dim = subtext0
diff --git a/palette/roles-nord.conf b/palette/roles-nord.conf
index eac750a..5881ba6 100644
--- a/palette/roles-nord.conf
+++ b/palette/roles-nord.conf
@@ -14,6 +14,10 @@ surface = nord1
surface_alt = nord2
border = nord3
+# The translucent ground behind a fullscreen overlay (power menu, screenshot
+# menu): the background, faded so the session shows through.
+scrim = nord0/88
+
fg = nord4
fg_dim = nord4
fg_faint = nord3
diff --git a/palette/roles-tokyo-night.conf b/palette/roles-tokyo-night.conf
index cd02e3c..5c9eb27 100644
--- a/palette/roles-tokyo-night.conf
+++ b/palette/roles-tokyo-night.conf
@@ -13,6 +13,10 @@ surface = bg_highlight
surface_alt = bg_visual
border = fg_gutter
+# The translucent ground behind a fullscreen overlay (power menu, screenshot
+# menu): the background, faded so the session shows through.
+scrim = bg/88
+
fg = fg
fg_dim = fg_dark
fg_faint = comment
diff --git a/rofi/udt/powermenu.rasi b/rofi/udt/powermenu.rasi
index d2c885a..92c5b07 100644
--- a/rofi/udt/powermenu.rasi
+++ b/rofi/udt/powermenu.rasi
@@ -12,11 +12,11 @@
/* The fullscreen ground is translucent so the desktop stays faintly visible
* behind it, which keeps the overlay reading as a layer over the session
- * rather than a screen the session was replaced by. Written as an explicit
- * rgba rather than @base, since the palette entries are fully opaque. */
+ * rather than a screen the session was replaced by. @scrim is the scheme's
+ * background at 88% alpha, the one translucent palette entry. */
window {
fullscreen: true;
- background-color: rgba(36, 39, 58, 0.88);
+ background-color: @scrim;
border: 0;
border-radius: 0;
padding: 0;