dot_testing/scripts/disp

23 lines
524 B
Bash
Executable File

#!/bin/sh
exists() {
xrandr | grep ' connected' | grep "${1}" | wc -l
}
if [ $(exists "HDMI2") -eq 1 ] && [ $(exists "LVDS1") -eq 1 ]; then
xrandr --output LVDS1 --below HDMI2 --auto
bspc monitor LVDS1 I II III IV V
bspc monitor HDMI2 VI VII VIII IX
exit 0
fi
if [ $(exists "HDMI1") -eq 1 ] && [ $(exists "LVDS1") -eq 1 ]; then
xrandr --output LVDS1 --below HDMI1 --auto
bspc monitor LVDS1 I II III IV V
bspc monitor HDMI1 VI VII VIII IX
exit 0
fi
bspc monitor -d I II III IV V VI VII VIII IX X
exit 0