blob: da9a1b299a886b388224ea4ec52b812ae6e383fc (
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
|
#!/bin/sh
main () {
case "$1" in
-d)
dock ;;
-u)
undock ;;
*)
echo "usage: dock [-du]";;
esac
}
dock () {
if ! swaymsg -t get_outputs | grep -q "HDMI-A-1" ; then
echo "error: HDMI not connected"; exit 1
fi
swaymsg output HDMI-A-1 enable res 2560x1440@70Hz
swaymsg output eDP-1 disable
}
undock () {
swaymsg output eDP-1 enable res 1920x1080
swaymsg output HDMI-A-1 disable
}
main "$@"
|