postrun is not needed anymore in display chooser.

This commit is contained in:
Bartek Stalewski 2023-02-09 01:33:06 +01:00
parent 417c39af19
commit 66656a3034

View File

@ -38,11 +38,6 @@ onescreen() {
fi
}
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
}
# Get all possible displays
allposs=$(xrandr -q | grep "connected")
@ -51,7 +46,7 @@ screens=$(echo "$allposs" | awk '/ connected/ {print $1}')
# If there's only one screen
[ "$(echo "$screens" | wc -l)" -lt 2 ] &&
{ onescreen "$screens" "native"; postrun; notify-send -t 2000 -u critical ' no device to switch'; exit ;}
{ onescreen "$screens" "native"; notify-send -t 2000 -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") &&
@ -59,5 +54,3 @@ case "$chosen" in
"multi") twoscreen ;;
*) onescreen "$chosen" ;;
esac
postrun