almost works, but desktops on second monitor do not work

This commit is contained in:
randomuser 2022-07-31 22:42:20 -05:00
parent c2073a8440
commit 0bc10fa4ef
1 changed files with 9 additions and 9 deletions

18
sh/disp
View File

@ -4,6 +4,15 @@ exists() {
xrandr | grep ' connected' | grep "${1}" | wc -l
}
if [ $(exists "HDMI-2") -eq 1 ] && [ $(exists "LVDS-1") -eq 1 ]; then
printf "two"
xrandr --output HDMI-2 --right-of LVDS-1 --auto
xrandr --output VGA-1 --off --auto
bspc monitor LVDS-1 -d I II III IV V VI VII VIII IX X
bspc monitor HDMI-2 -d I II III IV V VI VII VIII IX X
exit 0
fi
if [ $(exists "HDMI-2") -eq 1 ]; then
printf "one"
xrandr --output LVDS-1 --off --auto
@ -18,12 +27,3 @@ if [ $(exists "LVDS-1") -eq 1 ]; then
bspc monitor LVDS-1 -a I II III IV V VI VII VIII IX
exit 0
fi
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
exit 0
fi