summaryrefslogtreecommitdiffstats
path: root/connect-screen
diff options
context:
space:
mode:
Diffstat (limited to 'connect-screen')
-rwxr-xr-xconnect-screen6
1 files changed, 5 insertions, 1 deletions
diff --git a/connect-screen b/connect-screen
index 657b07f..cc1545d 100755
--- a/connect-screen
+++ b/connect-screen
@@ -3,5 +3,9 @@
xrandr --output VIRTUAL1 --off
xrandr --output HDMI2 --off
xset r rate 250 50
-xrandr --output HDMI2 --right-of eDP1 --auto
+
+if xrandr | grep -q '^HDMI2 connected'; then
+ xrandr --output HDMI2 --right-of eDP1 --auto
+fi
+
xkbcomp .xkbmap "$DISPLAY"