diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-13 17:45:28 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-13 17:45:28 +0200 |
| commit | f438dd7c8c98699966d3da1cfafd95d299f6b613 (patch) | |
| tree | e2eb9efdd6b3f632ecf708a564948a25058698e9 /mail-overview | |
| parent | d58ba8fb978bb8707c52a57b3cbd2ba75c2edac0 (diff) | |
| download | quickshell-f438dd7c8c98699966d3da1cfafd95d299f6b613.tar.gz quickshell-f438dd7c8c98699966d3da1cfafd95d299f6b613.zip | |
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.
Diffstat (limited to 'mail-overview')
| -rwxr-xr-x | mail-overview/mail-notify.sh | 11 |
1 files 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 "key<TAB>label" 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 |
