diff --git a/scripts/monitor_switch.sh b/scripts/monitor_switch.sh index d3bec85..6ecfb04 100755 --- a/scripts/monitor_switch.sh +++ b/scripts/monitor_switch.sh @@ -2,6 +2,14 @@ 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 + done +fi + ./prepare_monitors.sh nitrogen --restore & ~/.config/bspwm/bspwmrc