From ac72db38bba25647430558516f696027ce4b2a7b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 4 Dec 2019 10:26:38 +0100 Subject: connect-screen: Only enable HDMI if it is connected Signed-off-by: Florian Pritz --- connect-screen | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'connect-screen') 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" -- cgit v1.2.3-24-g4f1b