2021-05-31 13:23:35 +02:00
|
|
|
#!/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() {
|
2021-05-31 13:23:35 +02:00
|
|
|
if [ "$1" = "start" ]; then
|
2021-05-31 13:26:58 +02:00
|
|
|
move_workspace "3: " "HDMI-A-2"
|
|
|
|
move_workspace "2: " "eDP-1"
|
2021-05-31 13:23:35 +02:00
|
|
|
elif [ "$1" = "stop" ]; then
|
2021-05-31 13:26:58 +02:00
|
|
|
move_workspace "3: " "eDP-1"
|
|
|
|
move_workspace "2: " "HDMI-A-2"
|
2021-05-31 13:23:35 +02:00
|
|
|
else
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ $# -lt 1 ]; then
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
|
|
|
|
action=$1
|
|
|
|
|
2021-05-31 13:26:58 +02:00
|
|
|
main "$action"
|