summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2019-12-04 10:26:38 +0100
committerFlorian Pritz <bluewind@xinu.at>2019-12-04 10:26:38 +0100
commitac72db38bba25647430558516f696027ce4b2a7b (patch)
treea5d459628008a59ec494c9ea3e37f274efaf3bdc
parent9f29c085eb20f65bc494520e42c7aac5d5f782c8 (diff)
downloadbin-ac72db38bba25647430558516f696027ce4b2a7b.tar.gz
bin-ac72db38bba25647430558516f696027ce4b2a7b.tar.xz
connect-screen: Only enable HDMI if it is connected
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-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"