configfiles/scripts/monsetup_menu.sh

20 lines
295 B
Bash
Executable file

#!/bin/bash
cd $(dirname $0)
DMENU="./dmenu.sh"
menu() {
echo $@ | tr ' ' '\n' | $DMENU
}
EXTERN="VGA1"
if [ -n "$(xrandr -q | grep "$EXTERN connected")" ]; then # External Monitor connected
mode=$(menu second clone off)
else
mode=off
fi
[ -n "$mode" ] && ./monsetup.sh $mode