From 37da84422a52fd945fed91f2cf129da2d4f8cabb Mon Sep 17 00:00:00 2001 From: The_miro Date: Thu, 30 Jul 2026 20:03:18 +0200 Subject: [PATCH] fix(hyprlua): match notif/audio-panel theming to eww's violet/magenta look MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mnotifd, mnotifhist, and audio-panel filled cards/pills with solid @violet (border indistinguishable from fill), unlike the hollow @bg-fill + @violet-border pills used everywhere else (eww bar, astal-menu). Flip default-state fills to @bg, keep @accent for hover/checked/active states, and drop the audio-panel default-device button's hardcoded green in favour of @accent. Also give the eww bar's drawer/notif/caffeine buttons the same circular .icon-btn treatment as the screen-rotation buttons (touch variant only — the laptop bar's 20px height has no room for a 40px circle), and make the notif bell light up @accent whenever mnotifd's history cache has entries (new notif-active-status.sh poll), rather than only matching hover. Co-Authored-By: Claude Sonnet 5 --- .../hyprdrive/greetd-regreet}/regreet.css | 0 .../hyprdrive/greetd-regreet}/regreet.toml | 0 .../hyprlua/audio-panel-theme/style.css | 10 +++---- .../hyprlua/audio-panel/style/style.css | 10 +++---- desktopenvs/hyprlua/eww-touch/eww.scss | 16 +++++++----- desktopenvs/hyprlua/eww-touch/eww.yuck | 20 +++++++++++--- desktopenvs/hyprlua/eww/eww.scss | 26 ++++++++++--------- desktopenvs/hyprlua/eww/eww.yuck | 12 +++++++-- desktopenvs/hyprlua/mnotifd-theme/style.css | 10 +++---- desktopenvs/hyprlua/mnotifd/style/style.css | 10 +++---- .../hyprlua/mnotifhist-theme/style.css | 4 +-- .../hyprlua/mnotifhist/style/style.css | 4 +-- .../hyprlua/scripts/notif-active-status.sh | 14 ++++++++++ 13 files changed, 87 insertions(+), 49 deletions(-) rename {etc-greetd => desktopenvs/hyprdrive/greetd-regreet}/regreet.css (100%) rename {etc-greetd => desktopenvs/hyprdrive/greetd-regreet}/regreet.toml (100%) create mode 100755 desktopenvs/hyprlua/scripts/notif-active-status.sh diff --git a/etc-greetd/regreet.css b/desktopenvs/hyprdrive/greetd-regreet/regreet.css similarity index 100% rename from etc-greetd/regreet.css rename to desktopenvs/hyprdrive/greetd-regreet/regreet.css diff --git a/etc-greetd/regreet.toml b/desktopenvs/hyprdrive/greetd-regreet/regreet.toml similarity index 100% rename from etc-greetd/regreet.toml rename to desktopenvs/hyprdrive/greetd-regreet/regreet.toml diff --git a/desktopenvs/hyprlua/audio-panel-theme/style.css b/desktopenvs/hyprlua/audio-panel-theme/style.css index 36005c9..a27ce92 100644 --- a/desktopenvs/hyprlua/audio-panel-theme/style.css +++ b/desktopenvs/hyprlua/audio-panel-theme/style.css @@ -30,7 +30,7 @@ drawingarea { } .sb-panel { - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 12px; padding: 14px 16px; @@ -50,7 +50,7 @@ drawingarea { .sb-tabbar { margin-bottom: 4px; margin-right: 64px; } .sb-tab { color: @text; - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 16px; padding: 4px 14px; @@ -154,7 +154,7 @@ drawingarea { .sb-lr-toggle, .sb-default-btn { color: @text; - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 14px; padding: 2px 10px; @@ -178,8 +178,8 @@ drawingarea { color: @bg; } .sb-default-btn:checked { - background-color: #34E27A; - border-color: #34E27A; + background-color: @accent; + border-color: @accent; color: @bg; } .sb-default-btn:disabled { opacity: 0.85; } diff --git a/desktopenvs/hyprlua/audio-panel/style/style.css b/desktopenvs/hyprlua/audio-panel/style/style.css index f353bf5..b6411aa 100644 --- a/desktopenvs/hyprlua/audio-panel/style/style.css +++ b/desktopenvs/hyprlua/audio-panel/style/style.css @@ -30,7 +30,7 @@ drawingarea { } .sb-panel { - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 12px; padding: 14px 16px; @@ -50,7 +50,7 @@ drawingarea { .sb-tabbar { margin-bottom: 4px; margin-right: 64px; } .sb-tab { color: @text; - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 16px; padding: 4px 14px; @@ -154,7 +154,7 @@ drawingarea { .sb-lr-toggle, .sb-default-btn { color: @text; - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 14px; padding: 2px 10px; @@ -178,8 +178,8 @@ drawingarea { color: @bg; } .sb-default-btn:checked { - background-color: #34E27A; - border-color: #34E27A; + background-color: @accent; + border-color: @accent; color: @bg; } .sb-default-btn:disabled { opacity: 0.85; } diff --git a/desktopenvs/hyprlua/eww-touch/eww.scss b/desktopenvs/hyprlua/eww-touch/eww.scss index b98032a..e48b666 100644 --- a/desktopenvs/hyprlua/eww-touch/eww.scss +++ b/desktopenvs/hyprlua/eww-touch/eww.scss @@ -89,22 +89,24 @@ tooltip { color: #E40046; } -// astal-menu launcher button — accent-coloured icon, highlight on hover +// astal-menu launcher button — purple by default, hot-pink accent on hover .menu-launcher { - color: #E40046; + color: #5018dd; font-size: 15pt; } .menu-launcher:hover { - color: #5018dd; + color: #E40046; } -// notification-history launcher button (mnotifhist) — magenta, matches -// beacon/transmitter-panel's own notification-card accent colour +// notification-history launcher button (mnotifhist) — purple by default, +// hot-pink accent on hover or while any notification is cached in history +// (.notif-launcher-active, set in eww.yuck from the notif-active poll) .notif-launcher { - color: #EB00A6; + color: #5018dd; font-size: 15pt; } -.notif-launcher:hover { +.notif-launcher:hover, +.notif-launcher.notif-launcher-active { color: #E40046; } diff --git a/desktopenvs/hyprlua/eww-touch/eww.yuck b/desktopenvs/hyprlua/eww-touch/eww.yuck index 1bfc8ea..8062324 100644 --- a/desktopenvs/hyprlua/eww-touch/eww.yuck +++ b/desktopenvs/hyprlua/eww-touch/eww.yuck @@ -14,6 +14,12 @@ (defpoll battery :interval "2s" "~/.config/scripts/batteryperc") +; notif-active poll — true while mnotifd's history cache holds any entries +; (survives past whatever's currently on screen). Drives the +; .notif-launcher-active accent highlight above. +(defpoll notif-active :interval "2s" + "~/Dotfiles/desktopenvs/hyprlua/scripts/notif-active-status.sh") + (defwidget bar [monitor_] @@ -26,9 +32,14 @@ (box :orientation "h" :space-evenly false :halign "start" (osk) (box :class "music" {"${battery}"}) - (button :class "music menu-launcher" :onclick "~/.config/scripts/menu-toggle.sh toggle top" {""}) - ; notification-history launcher - (button :class "music notif-launcher" :onclick "~/.config/scripts/mnotifhist.sh" {"󰂚"}) + (button :class "icon-btn menu-launcher" :valign "center" :width 26 :height 26 + :orientation "h" :space-evenly false :halign "center" + :onclick "~/.config/scripts/menu-toggle.sh toggle top" {""}) + ; notification-history launcher — accent-coloured while any + ; notification is cached (notif-active poll below) + (button :class {notif-active == "true" ? "icon-btn notif-launcher notif-launcher-active" : "icon-btn notif-launcher"} + :valign "center" :width 26 :height 26 :orientation "h" :space-evenly false :halign "center" + :onclick "~/.config/scripts/mnotifhist.sh" {"󰂚"}) ; Volume slider — 󰓃 icon, drag to adjust, tap to open audio-panel ; (the PipeWire mixer panel — Applications/Output/Input/General tabs) (metric :label "󰓃 " @@ -184,7 +195,8 @@ ; Colour tracks presence (pink accent); the glyph is coffee whenever manually ; inhibiting, else the eye when only presence holds it, else the sleep glyph. (defwidget caffeine [] - (button :class {presence-active == "true" ? "music caffeine-presence" : "music"} + (button :class {presence-active == "true" ? "icon-btn caffeine-presence" : "icon-btn"} + :valign "center" :width 26 :height 26 :orientation "h" :space-evenly false :halign "center" :onclick "~/Dotfiles/desktopenvs/hyprlua/scripts/caffeine.sh" :tooltip {caffeine-manual == "true" ? (presence-active == "true" ? "Caffeine: ON (manual + presence)" : "Caffeine: ON (manual)") diff --git a/desktopenvs/hyprlua/eww/eww.scss b/desktopenvs/hyprlua/eww/eww.scss index 99a3210..1d46415 100644 --- a/desktopenvs/hyprlua/eww/eww.scss +++ b/desktopenvs/hyprlua/eww/eww.scss @@ -109,21 +109,23 @@ menuitem:hover { color: #E40046; } -// astal-menu launcher button — accent-coloured icon, highlight on hover +// astal-menu launcher button — purple by default, hot-pink accent on hover .menu-launcher { - color: #E40046; + color: #5018dd; font-size: 15pt; } .menu-launcher:hover { - color: #5018dd; -} - -// notification-history launcher button (mnotifhist) — magenta, matches -// beacon/transmitter-panel's own notification-card accent colour -.notif-launcher { - color: #EB00A6; - font-size: 15pt; -} -.notif-launcher:hover { + color: #E40046; +} + +// notification-history launcher button (mnotifhist) — purple by default, +// hot-pink accent on hover or while any notification is cached in history +// (.notif-launcher-active, set in eww.yuck from the notif-active poll) +.notif-launcher { + color: #5018dd; + font-size: 15pt; +} +.notif-launcher:hover, +.notif-launcher.notif-launcher-active { color: #E40046; } diff --git a/desktopenvs/hyprlua/eww/eww.yuck b/desktopenvs/hyprlua/eww/eww.yuck index 9f1bdb2..a458a4f 100644 --- a/desktopenvs/hyprlua/eww/eww.yuck +++ b/desktopenvs/hyprlua/eww/eww.yuck @@ -37,6 +37,12 @@ (defpoll battery :interval "2s" "~/Dotfiles/desktopenvs/hyprland/scripts/batteryperc") +; notif-active poll — true while mnotifd's history cache holds any entries +; (survives past whatever's currently on screen). Drives the +; .notif-launcher-active accent highlight below. +(defpoll notif-active :interval "2s" + "~/Dotfiles/desktopenvs/hyprlua/scripts/notif-active-status.sh") + ; defwidget bar — root bar widget. Uses centerbox to split into three zones: @@ -56,8 +62,10 @@ (box :orientation "h" :space-evenly false :halign "start" ; astal-menu launcher — opens the popup control centre / app drawer (button :class "music menu-launcher" :onclick "~/.config/scripts/menu-toggle.sh toggle top" {""}) - ; notification-history launcher — opens mnotifhist - (button :class "music notif-launcher" :onclick "~/.config/scripts/mnotifhist.sh" {"󰂚"}) + ; notification-history launcher — opens mnotifhist; accent-coloured + ; while any notification is cached (notif-active poll above) + (button :class {notif-active == "true" ? "music notif-launcher notif-launcher-active" : "music notif-launcher"} + :onclick "~/.config/scripts/mnotifhist.sh" {"󰂚"}) ; Battery percentage badge — styled as a pill with class "music" (box :class "music" {"${battery}"}) ; Workspace dots — one button per active workspace on this monitor diff --git a/desktopenvs/hyprlua/mnotifd-theme/style.css b/desktopenvs/hyprlua/mnotifd-theme/style.css index b50fc9b..76105ec 100644 --- a/desktopenvs/hyprlua/mnotifd-theme/style.css +++ b/desktopenvs/hyprlua/mnotifd-theme/style.css @@ -34,7 +34,7 @@ drawingarea { /* the card */ .mnotifd-card { - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 12px; padding: 12px 14px; @@ -71,7 +71,7 @@ drawingarea { /* action pills */ .mnotifd-action { color: @text; - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 20px; padding: 2px 12px; @@ -92,7 +92,7 @@ drawingarea { } .mnotifd-toggle { - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 20px; min-width: 40px; @@ -108,7 +108,7 @@ drawingarea { } .mnotifd-slider trough { - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 20px; min-height: 8px; @@ -127,7 +127,7 @@ drawingarea { .mnotifd-entry { color: @text; - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 12px; padding: 2px 10px; diff --git a/desktopenvs/hyprlua/mnotifd/style/style.css b/desktopenvs/hyprlua/mnotifd/style/style.css index 78d2264..5f7b0b1 100644 --- a/desktopenvs/hyprlua/mnotifd/style/style.css +++ b/desktopenvs/hyprlua/mnotifd/style/style.css @@ -34,7 +34,7 @@ drawingarea { /* the card */ .mnotifd-card { - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 12px; padding: 12px 14px; @@ -71,7 +71,7 @@ drawingarea { /* action pills */ .mnotifd-action { color: @text; - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 20px; padding: 2px 12px; @@ -92,7 +92,7 @@ drawingarea { } .mnotifd-toggle { - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 20px; min-width: 40px; @@ -108,7 +108,7 @@ drawingarea { } .mnotifd-slider trough { - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 20px; min-height: 8px; @@ -127,7 +127,7 @@ drawingarea { .mnotifd-entry { color: @text; - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 12px; padding: 2px 10px; diff --git a/desktopenvs/hyprlua/mnotifhist-theme/style.css b/desktopenvs/hyprlua/mnotifhist-theme/style.css index d25523f..e4247ec 100644 --- a/desktopenvs/hyprlua/mnotifhist-theme/style.css +++ b/desktopenvs/hyprlua/mnotifhist-theme/style.css @@ -29,7 +29,7 @@ drawingarea { } .tx-panel { - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 12px; padding: 14px 16px; @@ -46,7 +46,7 @@ drawingarea { .tx-clear-all { color: @text; - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 20px; padding: 4px 14px; diff --git a/desktopenvs/hyprlua/mnotifhist/style/style.css b/desktopenvs/hyprlua/mnotifhist/style/style.css index 1655d53..4ae1fe3 100644 --- a/desktopenvs/hyprlua/mnotifhist/style/style.css +++ b/desktopenvs/hyprlua/mnotifhist/style/style.css @@ -29,7 +29,7 @@ drawingarea { } .tx-panel { - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 12px; padding: 14px 16px; @@ -46,7 +46,7 @@ drawingarea { .tx-clear-all { color: @text; - background-color: @violet; + background-color: @bg; border: 2px solid @violet; border-radius: 20px; padding: 4px 14px; diff --git a/desktopenvs/hyprlua/scripts/notif-active-status.sh b/desktopenvs/hyprlua/scripts/notif-active-status.sh new file mode 100755 index 0000000..18b3c32 --- /dev/null +++ b/desktopenvs/hyprlua/scripts/notif-active-status.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# Reports whether mnotifd's notification history currently holds any cached +# entries (persists across dismissed/expired cards — see mnotifd/history.py's +# HISTORY_FILE), not just whatever's live on screen right now. +# +# Prints "true" while at least one entry is cached, else "false". + +HISTORY_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/mnotifd/history.json" + +if [[ -s "$HISTORY_FILE" ]] && jq -e 'length > 0' "$HISTORY_FILE" >/dev/null 2>&1; then + echo "true" +else + echo "false" +fi