From 9aa14a2ab2973412e8318d583844d83e0fe23df3 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Sat, 14 Mar 2020 13:35:28 +0100 Subject: [PATCH] Configure a single HDMI screen on my dock --- local/bin/dockmode | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/local/bin/dockmode b/local/bin/dockmode index 6aefdb4..bbf98b4 100755 --- a/local/bin/dockmode +++ b/local/bin/dockmode @@ -5,14 +5,17 @@ xset dpms 0 0 0 dp1="$(xrandr | grep '^DP1 connected')" dp1_1="$(xrandr | grep '^DP1-1 connected')" dp1_2="$(xrandr | grep '^DP1-2 connected')" +dp1_3="$(xrandr | grep '^DP1-3 connected')" -if [ -n "$dp1" -a -z "$dp1_1" -a -z "$dp1_2" ]; then +if [ -n "$dp1" -a -z "$dp1_1" -a -z "$dp1_2" -a -z "$dp1_3" ]; then xrandr --output DP1 --auto --above eDP1 -elif [ -z "$dp1" -a -n "$dp1_1" -a -z "$dp1_2" ]; then +elif [ -z "$dp1" -a -n "$dp1_1" -a -z "$dp1_2" -a -z "$dp1_3" ]; then xrandr --output DP1-1 --auto --above eDP1 -elif [ -z "$dp1" -a -n "$dp1_1" -a -n "$dp1_2" ]; then +elif [ -z "$dp1" -a -n "$dp1_1" -a -n "$dp1_2" -a -z "$dp1_3" ]; then xrandr --output DP1-1 --auto --left-of eDP1 \ --output DP1-2 --auto --right-of eDP1 +elif [ -z "$dp1" -a -z "$dp1_1" -a -z "$dp1_2" -a -n "$dp1_3" ]; then + xrandr --output DP1-3 --auto --above eDP1 fi ~/.fehbg