vscripts/dmenu_laptop_screens

19 lines
530 B
Text
Raw Normal View History

2017-06-13 17:52:17 +03:00
#!/usr/bin/env zsh
if [[ -r $HOME/.displayrc ]]; then
. $HOME/.displayrc
else
exit 1
fi
2017-06-13 17:52:17 +03:00
variants=(int ext both)
selection=$(printf "%s\n" $variants|dmenu -p display "$@")
case $selection in
($variants[1]) xrandr --output $DISPLAY2 --off --output $DISPLAY1 --auto ;;
($variants[2]) xrandr --output $DISPLAY1 --off --output $DISPLAY2 --auto ;;
($variants[3]) xrandr --output $DISPLAY1 --auto --output $DISPLAY2 --auto --right-of eDP1 ;;
2017-06-13 17:52:17 +03:00
(*) exit 0 ;;
esac
feh --bg-scale $HOME/.wallpaper.png
2017-06-13 17:52:17 +03:00
sleep 1
exit 0