From 37b42223f83b68ac706c8895f63d9540ac3ea4b6 Mon Sep 17 00:00:00 2001 From: tactonbishop Date: Sun, 15 May 2022 13:28:44 +0100 Subject: [PATCH] Add Display Port handling --- x/xinitrc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/x/xinitrc b/x/xinitrc index 8732658..01698df 100644 --- a/x/xinitrc +++ b/x/xinitrc @@ -52,7 +52,16 @@ fi #### Custom ######## # Set external monitor config -xrandr --output VGA1 --primary --above LVDS1 +if [[ "$(xrandr | awk '/^VGA/ { print $2 }')" == "connected" ]]; then + xrandr --output VGA1 --primary --above LVDS1 +elif [[ "$(xrandr | awk '/^DP1/ { print $2 }')" == "connected" ]];then + xrandr --output DP1 --primary --above LVDS1 +else : +fi + +# xrandr --output VGA1 --primary --above LVDS1 +# xrandr --output DP1 --primary --above LVDS1 +#source "{$HOME}/bash_scripts/connect_monitors.sh" # Set UK keyboard setxkbmap gb