From eacff1a8156ee670e7e195ebedf6962c0b1b9ba9 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Sun, 21 Jul 2024 19:20:08 -0600 Subject: [PATCH] support swaync Playing around with new notification center. -e makes it not be stored in the notification history. --app-name causes different custom notifications not to stack --- waybar/waybar-backlight.sh | 4 ++-- waybar/waybar-volume.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/waybar/waybar-backlight.sh b/waybar/waybar-backlight.sh index 7083426..7d11c65 100755 --- a/waybar/waybar-backlight.sh +++ b/waybar/waybar-backlight.sh @@ -42,9 +42,9 @@ else fi if [ -z $NOTIFY_ID ]; then - NOTIFY_ID=$(notify-send --category=backlight --urgency=low --hint=int:value:$BRIGHTNESS --icon=${HOME}/.icons/Gruvbox/48x48@2x/devices/notification-display-brightness${ICON}.svg -p -t 1000 Backlight ${BRIGHTNESS}%) + NOTIFY_ID=$(notify-send -e --app-name=waybar-backlight --category=backlight --urgency=low --hint=int:value:$BRIGHTNESS --icon=${HOME}/.icons/Gruvbox/48x48@2x/devices/notification-display-brightness${ICON}.svg -p -t 1000 Backlight ${BRIGHTNESS}%) else - NOTIFY_ID=$(notify-send --category=backlight --urgency=low --hint=int:value:$BRIGHTNESS --icon=${HOME}/.icons/Gruvbox/48x48@2x/status/notification-display-brightness${ICON}.svg -p -t 1000 -r $NOTIFY_ID Backlight ${BRIGHTNESS}%) + NOTIFY_ID=$(notify-send -e --app-name=waybar-backlight --category=backlight --urgency=low --hint=int:value:$BRIGHTNESS --icon=${HOME}/.icons/Gruvbox/48x48@2x/status/notification-display-brightness${ICON}.svg -p -t 1000 -r $NOTIFY_ID Backlight ${BRIGHTNESS}%) fi echo $NOTIFY_ID > /tmp/brightness-notification diff --git a/waybar/waybar-volume.sh b/waybar/waybar-volume.sh index 0bbb9c8..5945716 100755 --- a/waybar/waybar-volume.sh +++ b/waybar/waybar-volume.sh @@ -46,9 +46,9 @@ else fi if [[ -z $NOTIFY_ID ]]; then - NOTIFY_ID=$(notify-send --category=volume --urgency=low --hint=int:value:$VOLUME --icon=${HOME}/.icons/Gruvbox/48x48@2x/devices/notification-audio-volume${ICON}.svg -p -t 1000 Volume ${VOLUME}%) + NOTIFY_ID=$(notify-send -e --app-name=waybar-volume --category=volume --urgency=low --hint=int:value:$VOLUME --icon=${HOME}/.icons/Gruvbox/48x48@2x/devices/notification-audio-volume${ICON}.svg -p -t 1000 Volume ${VOLUME}%) else - NOTIFY_ID=$(notify-send --category=volume --urgency=low --hint=int:value:$VOLUME --icon=${HOME}/.icons/Gruvbox/48x48@2x/status/notification-audio-volume${ICON}.svg -p -r $NOTIFY_ID -t 1000 Volume ${VOLUME}%) + NOTIFY_ID=$(notify-send -e --app-name=waybar-volume --category=volume --urgency=low --hint=int:value:$VOLUME --icon=${HOME}/.icons/Gruvbox/48x48@2x/status/notification-audio-volume${ICON}.svg -p -r $NOTIFY_ID -t 1000 Volume ${VOLUME}%) fi VOLUME=$(pactl get-sink-volume $SINK | grep Volume | sed -r 's/.* (1?[0-9]?[0-9])% \/.*/\1/')