diff options
Diffstat (limited to '.local/bin/setscreens.sh')
-rwxr-xr-x | .local/bin/setscreens.sh | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/.local/bin/setscreens.sh b/.local/bin/setscreens.sh index 194ae90..2bab3a0 100755 --- a/.local/bin/setscreens.sh +++ b/.local/bin/setscreens.sh @@ -44,16 +44,15 @@ # # Script to set screens, loaded at startx only. -if xrandr | grep 'HDMI-1 connected'; then - if xrandr | grep 'VGA-1 connected'; then - xrandr --output LVDS-1 --off - xrandr --output HDMI-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal - xrandr --output DP-1 --off - xrandr --output VGA-1 --mode 1440x900 --pos 1920x180 --rotate normal - xrandr --output HDMI-2 --off - xrandr --output HDMI-3 --off - xrandr --output DP-2 --off - xrandr --output DP-3 --off +if xrandr | grep 'HDMI-1 connected' && xrandr | grep 'VGA-1 connected'; then + xrandr --output LVDS-1 --off + xrandr --output HDMI-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal + xrandr --output DP-1 --off + xrandr --output VGA-1 --mode 1440x900 --pos 1920x180 --rotate normal + xrandr --output HDMI-2 --off + xrandr --output HDMI-3 --off + xrandr --output DP-2 --off + xrandr --output DP-3 --off else xrandr --output LVDS-1 --primary --mode 1366x768 --pos 0x0 --rotate normal xrandr --output VGA-1 --off |