summaryrefslogtreecommitdiff
path: root/toggle-docked.sh
blob: beb09653811e2b6cc96d6bd04bf6dce307285305 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
hasVGA=$(xrandr | grep VGA-0 | cut -w -f2)

if [ "$hasVGA" = "connected" ]; then
	killall xautolock
	autolocker.sh -d &
	xrandr \
		--output VGA-0 \
		--mode 1024x768 \
		--pos 1920x312 \
		--rotate normal \
		--dpi 82 \
		--output DP-0 \
		--off \
		--output DP-1 \
		--off \
		--output DP-2 \
		--off \
		--output DP-3 \
		--primary \
		--mode 1920x1080 \
		--pos 0x0 \
		--rotate normal \
		--dpi 96 \
		--output DP-4 \
		--off
else
	killall xautolock 
	autolocker.sh &
	xrandr \
		--output VGA-0 \
		--off \
		--output DP-0 \
		--off \
		--output DP-1 \
		--off \
		--output DP-2 \
		--off \
		--output DP-3 \
		--primary \
		--mode 1920x1080 \
		--pos 0x0 \
		--rotate normal \
		--dpi 96 \
		--output DP-4 \
		--off
fi