configuration/local/bin/dockmode

19 lines
548 B
Plaintext
Raw Normal View History

2016-04-01 09:21:53 +02:00
#!/bin/bash
xset dpms 0 0 0
2016-04-01 09:21:53 +02:00
dp1="$(xrandr --listactivemonitors | grep ' DP1$')"
dp1_1="$(xrandr --listactivemonitors | grep ' DP1-1$')"
dp1_2="$(xrandr --listactivemonitors | grep ' DP1-2$')"
2016-04-01 09:21:53 +02:00
if [ -n "$dp1" -a -z "$dp1_1" -a -z "$dp1_2" ]; then
xrandr --output DP1 --auto --above eDP1
elif [ -z "$dp1" -a -n "$dp1_1" -a -z "$dp1_2" ]; then
xrandr --output DP1-1 --auto --above eDP1
elif [ -z "$dp1" -a -n "$dp1_1" -a -n "$dp1_2" ]; then
xrandr --output DP1-1 --auto --left-of eDP1 \
--output DP1-2 --auto --right-of eDP1
fi
~/.fehbg