vscripts/dmenu_displays

17 lines
583 B
Bash
Executable file

#!/usr/bin/env zsh
if [[ -r $HOME/.displayrc ]]; then
. $HOME/.displayrc
else
exit 1
fi
selection=$(printf "%s\n" $VARIANTS|/usr/bin/dmenu -p display "$@")
case $selection in
($VARIANTS[1]) /usr/bin/xrandr --output $EXT --off --output $BUILTIN $BUILTIN_MODE[@];;
($VARIANTS[2]) /usr/bin/xrandr --output $BUILTIN --off --output $EXT $EXT_MODE[@];;
($VARIANTS[3]) /usr/bin/xrandr --output $BUILTIN $BUILTIN_MODE[@] --auto --output $EXT $EXT_MODE[@] --right-of $BUILTIN;;
(*) exit 1 ;;
esac
/usr/bin/feh --bg-${WP_MODE-scale} $WALLPAPER
/usr/bin/sleep 1
exit 0