blob: e1050a031fd73c3f48e6722f0eb66e49bdbe522e (
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
35
36
|
#!/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
~/.local/bin/barlaunch
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
~/.local/bin/barlaunch
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 "$@"
|