From 150c49e51e350f0573216a289c811147409bdd02 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Fri, 19 Mar 2021 17:53:13 +0100 Subject: Updated xinitrc to work with left screen disconnected --- config/x11/xinitrc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/x11/xinitrc b/config/x11/xinitrc index b9f9f61..0d422c0 100755 --- a/config/x11/xinitrc +++ b/config/x11/xinitrc @@ -7,9 +7,15 @@ unclutter --timeout 10 --fork # hide mouse after 2s case "$(cat /etc/hostname)" in cacharle-main) - xrandr --output DVI-0 --auto --left-of DVI-1 \ - --output DVI-1 --mode 1920x1080 --primary --left-of HDMI-0 \ - --output HDMI-0 --mode 1920x1080 + if xrandr | grep 'HDMI-0 connected' + then + xrandr --output DVI-0 --auto --left-of DVI-1 \ + --output DVI-1 --mode 1920x1080 --primary --left-of HDMI-0 \ + --output HDMI-0 --mode 1920x1080 + else + xrandr --output DVI-0 --auto --left-of DVI-1 \ + --output DVI-1 --mode 1920x1080 --primary + fi ;; charles-laptop) -- cgit