21 lines
295 B
Bash
21 lines
295 B
Bash
|
#!/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
|