diff --git a/sh/disp b/sh/disp index 9222e02..61e24f3 100755 --- a/sh/disp +++ b/sh/disp @@ -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