From f438dd7c8c98699966d3da1cfafd95d299f6b613 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 13 Sep 2026 17:45:28 +0200 Subject: fix(mail-overview): pass the mail icon by absolute path dunst here resolves a themed icon name only through icon_path, which holds no mail icon, so the name rendered nothing and dunst stored an empty icon_path. An absolute path resolves, which is what this machine's other notifiers already do. --- mail-overview/mail-notify.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mail-overview/mail-notify.sh b/mail-overview/mail-notify.sh index fc75c56..e6c9868 100755 --- a/mail-overview/mail-notify.sh +++ b/mail-overview/mail-notify.sh @@ -37,6 +37,13 @@ SCOPE='tag:unread and tag:inbox' # Three matches the drawer's own --limit=3. ROWS=3 +# dunst here resolves a themed icon NAME only through its icon_path, which +# holds no mail icon, so a name renders nothing (dunst stores an empty +# icon_path for it). Pass an absolute path, as this machine's other +# notifiers do. This is the icon the user picked; ${XDG_DATA_HOME} keeps a +# home path out of the committed file. +MAIL_ICON="${XDG_DATA_HOME:-$HOME/.local/share}/icons/MB-Blueberry-Suru-GLOW/actions/24/mail-unread-multiple.svg" + # Accounts in file order, one "keylabel" line each, read from stdin. # # Two things here are load-bearing, and both have already broken this @@ -170,7 +177,7 @@ notify_account() { if ! command -v dunstify >/dev/null 2>&1; then # No actions available, but a notification without a click is still # worth having. - notify-send -a "New Mail" -u normal -t 10000 -i mail-unread-multiple \ + notify-send -a "New Mail" -u normal -t 10000 -i "$MAIL_ICON" \ "$label ($count)" "$body" return 0 fi @@ -179,7 +186,7 @@ notify_account() { # clicked. Without this the loop would stall for the full timeout on # every account, and a five-account batch would take most of a minute. ( - if [[ "$(dunstify -a "New Mail" -i mail-unread-multiple -u normal -t 10000 -b \ + if [[ "$(dunstify -a "New Mail" -i "$MAIL_ICON" -u normal -t 10000 -b \ -h "string:x-dunst-stack-tag:mail-$key" \ -A "default,open" \ "$label ($count)" "$body")" == "default" ]]; then -- cgit v1.2.3