dotfiles/scripts/.local/share/scripts/videocall

31 lines
430 B
Plaintext
Raw Normal View History

#!/bin/sh
usage() {
echo "Usage: videocall <start|stop>"
exit 1
}
2021-05-31 13:26:58 +02:00
move_workspace() {
swaymsg workspace "$1", move workspace to "$2"
}
main() {
if [ "$1" = "start" ]; then
2021-05-31 13:26:58 +02:00
move_workspace "3: " "HDMI-A-2"
move_workspace "2: " "eDP-1"
elif [ "$1" = "stop" ]; then
2021-05-31 13:26:58 +02:00
move_workspace "3: " "eDP-1"
move_workspace "2: " "HDMI-A-2"
else
usage
fi
}
if [ $# -lt 1 ]; then
usage
fi
action=$1
2021-05-31 13:26:58 +02:00
main "$action"