2016-04-01 09:21:53 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-11-14 14:37:48 +01:00
|
|
|
xset dpms 0 0 300
|
2016-04-01 09:21:53 +02:00
|
|
|
|
2020-01-20 14:10:50 +01:00
|
|
|
dp1="$(xrandr | grep '^DP1 connected')"
|
|
|
|
dp1_1="$(xrandr | grep '^DP1-1 connected')"
|
|
|
|
dp1_2="$(xrandr | grep '^DP1-2 connected')"
|
2020-03-14 13:35:28 +01:00
|
|
|
dp1_3="$(xrandr | grep '^DP1-3 connected')"
|
2016-04-01 09:21:53 +02:00
|
|
|
|
2020-03-14 13:35:28 +01:00
|
|
|
if [ -n "$dp1" -a -z "$dp1_1" -a -z "$dp1_2" -a -z "$dp1_3" ]; then
|
2021-08-17 09:59:41 +02:00
|
|
|
xrandr --output DP1 --auto --primary --above eDP1
|
2020-03-14 13:35:28 +01:00
|
|
|
elif [ -z "$dp1" -a -n "$dp1_1" -a -z "$dp1_2" -a -z "$dp1_3" ]; then
|
2021-08-17 09:59:41 +02:00
|
|
|
xrandr --output DP1-1 --auto --primary --above eDP1
|
2020-03-14 13:35:28 +01:00
|
|
|
elif [ -z "$dp1" -a -n "$dp1_1" -a -n "$dp1_2" -a -z "$dp1_3" ]; then
|
2019-11-21 15:11:38 +01:00
|
|
|
xrandr --output DP1-1 --auto --left-of eDP1 \
|
|
|
|
--output DP1-2 --auto --right-of eDP1
|
2020-03-14 13:35:28 +01:00
|
|
|
elif [ -z "$dp1" -a -z "$dp1_1" -a -z "$dp1_2" -a -n "$dp1_3" ]; then
|
2021-08-17 09:59:41 +02:00
|
|
|
xrandr --output DP1-3 --auto --primary --above eDP1
|
2019-11-21 15:11:38 +01:00
|
|
|
fi
|