blob: 9be72c14e19e03765a6dbdbe3bf30a7404a21792 (
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 "$XDG_CONFIG_HOME/wallpaper/bg"
betterlockscreen -u "$XDG_CONFIG_HOME/wallpaper/lock" >/dev/null 2>&1 &
}
undock () {
barpos top
xrandr --output eDP-1 --mode 1920x1080 --primary
xrandr --output HDMI-1 --off
xwallpaper --center "$XDG_CONFIG_HOME/wallpaper/bg"
betterlockscreen -u "$XDG_CONFIG_HOME/wallpaper/lock" >/dev/null 2>&1 &
}
main "$@"
|