Switching to built-in qtile's notification system.

This commit is contained in:
Bartek Stalewski 2022-11-06 16:27:52 +01:00
parent 58e39e049a
commit f340ed7c15
5 changed files with 10 additions and 6 deletions

View file

@ -40,7 +40,7 @@ onescreen() {
postrun() {
feh --no-fehbg --bg-scale ~/.local/share/wallpaper.jpg
{ killall dunst ; setsid -f dunst ;} >/dev/null 2>&1 # Restart dunst to ensure proper location on screen
#{ killall dunst ; setsid -f dunst ;} >/dev/null 2>&1 # Restart dunst to ensure proper location on screen
}
# Get all possible displays
@ -51,7 +51,7 @@ screens=$(echo "$allposs" | awk '/ connected/ {print $1}')
# If there's only one screen
[ "$(echo "$screens" | wc -l)" -lt 2 ] &&
{ onescreen "$screens" "native"; postrun; dunstify -u critical ' no device to switch'; exit ;}
{ onescreen "$screens" "native"; postrun; notify-send -u critical ' no device to switch'; exit ;}
# Get user choice including both and manual selection:
chosen=$(printf -- "%s\\nmulti" "$screens" | dmenu -c -l 5 -i -p "select output") &&