configfiles/scripts/.config/scripts/monitor_switch.sh
2015-10-08 10:31:53 +02:00

16 lines
269 B
Bash
Executable file

#!/bin/bash
cd $(dirname $0)
EXTERN=VGA1
if [ -z "$(xrandr -q | grep "$EXTERN connected")" ]; then
bspc query -W -m VGA1 | while read $wid; do
bspc window $wid -m "LVDS1:^1"
done
fi
./prepare_monitors.sh
nitrogen --restore &
~/.config/bspwm/bspwmrc