blob: 3d0c06f9820929169370b05e3db7ad8aad9b4162 (
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/bash
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 &
}
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 &
}
main "$@"
|