configfiles/scripts/monitor_switch.sh

15 lines
264 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
done
fi
./prepare_monitors.sh
nitrogen --restore &
~/.config/bspwm/bspwmrc