Compare commits

...

2 Commits

Author SHA1 Message Date
John Mertz 60344ec940 Reload waybar by using restore_display.sh with -w
Pass arguments to display.pl inside restore_display.sh
2024-07-21 19:21:24 -06:00
John Mertz eacff1a815 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
2024-07-21 19:20:08 -06:00
4 changed files with 6 additions and 7 deletions

View File

@ -4,6 +4,6 @@ OLDPWD=$OLDPWD
PWD=$PWD
cd $HOME/scripts/sway/
source ~/.dotfiles/bash/plenv-path.sh
perl -Ilocal/lib/perl5/5.38.2 displays.pl
perl -Ilocal/lib/perl5/5.38.2 displays.pl $@
cd $OLDPWD
cd $PWD

View File

@ -2,6 +2,5 @@
if [ -z ${SWAYSOCK+x} ]; then
i3 reload
else
cd ${HOME}/scripts/sway
perl -Ilocal/lib/perl5/5.38.2 display.pl -w
${HOME}/scripts/sway/restore_display.sh -w
fi

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