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
This commit is contained in:
John Mertz 2024-07-21 19:20:08 -06:00
parent c2cb64efea
commit eacff1a815
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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/')