dot_testing/sh/disp

30 lines
712 B
Plaintext
Raw Normal View History

2021-02-15 12:02:09 -06:00
#!/bin/sh
exists() {
xrandr | grep ' connected' | grep "${1}" | wc -l
}
2021-11-23 12:52:42 -06:00
if [ $(exists "HDMI-2") -eq 1 ]; then
printf "one"
2021-07-16 15:42:14 -05:00
xrandr --output LVDS-1 --off --auto
2021-11-23 12:52:42 -06:00
xrandr --output VGA-1 --off --auto
bspc monitor -d I II III IV V VI VII VIII IX X
bspc monitor -g 1680x1050+0+0
2021-04-26 11:07:35 -05:00
exit 0
fi
2021-11-23 12:52:42 -06:00
if [ $(exists "LVDS-1") -eq 1 ]; then
bspc monitor -d I II III IV V VI VII VIII IX X
bspc monitor LVDS-1 -a I II III IV V VI VII VIII IX
2021-07-16 15:42:14 -05:00
exit 0
fi
2021-11-23 12:52:42 -06:00
if [ $(exists "HDMI-2") -eq 1 ] && [ $(exists "LVDS-1") -eq 1 ]; then
printf "two"
xrandr --output HDMI-2 --above LVDS-1 --auto
xrandr --output VGA-1 --off --auto
bspc monitor LVDS-1 -a I III V VII IX
bspc monitor HDMI-2 -a II IV VI VIII
2021-04-26 11:07:35 -05:00
exit 0
fi