blob: 8d399306f3c0062e0aebfdce903f2c0f4de08dfb (
plain)
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
|
#!/bin/sh
main () {
case "$1" in
-d)
dock ;;
-u)
undock ;;
*)
echo "usage: dock [-du]";;
esac
}
dock () {
if ! xrandr | grep -q "HDMI-1 connected" ; then
echo "error: HDMI not connected"; exit 1
fi
barpos bottom
xrandr --output HDMI-1 --mode 2560x1440 --rate 70 --primary
xrandr --output eDP-1 --off
xwallpaper --center ~/.local/share/bg
betterlockscreen -u ~/.local/share/lock >/dev/null 2>&1 &
}
undock () {
barpos top
xrandr --output eDP-1 --mode 1920x1080 --primary
xrandr --output HDMI-1 --off
xwallpaper --center ~/.local/share/bg
betterlockscreen -u ~/.local/share/lock >/dev/null 2>&1 &
}
main "$@"
|