2021-02-15 12:02:09 -06:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
exists() {
|
|
|
|
xrandr | grep ' connected' | grep "${1}" | wc -l
|
|
|
|
}
|
|
|
|
|
2021-04-26 11:07:35 -05:00
|
|
|
if [ $(exists "HDMI2") -eq 1 ] && [ $(exists "LVDS1") -eq 1 ]; then
|
2021-04-26 11:08:40 -05:00
|
|
|
printf "HDMI2, LVDS1 exists\n"
|
2021-05-11 21:39:39 -05:00
|
|
|
xrandr --output HDMI2 --above LVDS1 --auto
|
|
|
|
bspc monitor LVDS1 -a I II III IV V
|
|
|
|
bspc monitor HDMI2 -a VI VII VIII IX
|
2021-04-26 11:07:35 -05:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $(exists "HDMI1") -eq 1 ] && [ $(exists "LVDS1") -eq 1 ]; then
|
2021-04-26 11:08:40 -05:00
|
|
|
printf "HDMI1, LVDS1 exists\n"
|
2021-05-11 21:39:39 -05:00
|
|
|
xrandr --output HDMI1 --above LVDS1 --auto
|
|
|
|
bspc monitor LVDS1 -a I II III IV V
|
|
|
|
bspc monitor HDMI1 -a VI VII VIII IX
|
2021-04-26 11:07:35 -05:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2021-04-26 11:08:40 -05:00
|
|
|
printf "defaulting to default configuration\n"
|
2021-05-11 21:39:39 -05:00
|
|
|
xrandr --output HDMI1 --off
|
|
|
|
xrandr --output HDMI2 --off
|
2021-04-26 11:07:35 -05:00
|
|
|
bspc monitor -d I II III IV V VI VII VIII IX X
|
|
|
|
exit 0
|