diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-13 17:42:27 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-13 17:42:27 +0200 |
| commit | d58ba8fb978bb8707c52a57b3cbd2ba75c2edac0 (patch) | |
| tree | 4043fc685a77c5c8b89e4d5da1ec471634d2bb28 | |
| parent | c4c4d9b0b05d4d327534487fc9cd412f8f34571f (diff) | |
| download | quickshell-d58ba8fb978bb8707c52a57b3cbd2ba75c2edac0.tar.gz quickshell-d58ba8fb978bb8707c52a57b3cbd2ba75c2edac0.zip | |
feat(mail-overview): split notification heading and use theme icon
The user's dunst format renders %a bold on the top line and %s
italic below it, so the app name now carries "New Mail" and the
summary carries "<account> (<count>)". mail-unread is not in the
active icon theme; mail-unread-multiple is.
| -rwxr-xr-x | mail-overview/mail-notify.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mail-overview/mail-notify.sh b/mail-overview/mail-notify.sh index f36bef2..fc75c56 100755 --- a/mail-overview/mail-notify.sh +++ b/mail-overview/mail-notify.sh @@ -165,11 +165,13 @@ write_state() { notify_account() { local label="$1" key="$2" count="$3" body="$4" + # -a carries "New Mail" because the user's dunst format renders %a as the + # bold heading line, with %s italic below it. 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 mail-overview -i mail-unread -u normal -t 10000 \ - "New Mail - $label ($count)" "$body" + notify-send -a "New Mail" -u normal -t 10000 -i mail-unread-multiple \ + "$label ($count)" "$body" return 0 fi @@ -177,10 +179,10 @@ 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 mail-overview -i mail-unread -u normal -t 10000 -b \ + if [[ "$(dunstify -a "New Mail" -i mail-unread-multiple -u normal -t 10000 -b \ -h "string:x-dunst-stack-tag:mail-$key" \ -A "default,open" \ - "New Mail - $label ($count)" "$body")" == "default" ]]; then + "$label ($count)" "$body")" == "default" ]]; then "$HOME/bin/qtmaildir" & fi ) >/dev/null 2>&1 & |
