aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-03-19 17:53:13 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-03-19 17:53:13 +0100
commit150c49e51e350f0573216a289c811147409bdd02 (patch)
tree916a3af699e1c804c8dfdcddff6bbfac62a07945
parentcd7b2c7852cae388138c0697160d86c6b8dc127a (diff)
downloaddotfiles-150c49e51e350f0573216a289c811147409bdd02.tar.gz
dotfiles-150c49e51e350f0573216a289c811147409bdd02.tar.bz2
dotfiles-150c49e51e350f0573216a289c811147409bdd02.zip
Updated xinitrc to work with left screen disconnected
-rwxr-xr-xconfig/x11/xinitrc12
1 files changed, 9 insertions, 3 deletions
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)