31 lines
430 B
Bash
Executable File
31 lines
430 B
Bash
Executable File
#!/bin/sh
|
|
|
|
usage() {
|
|
echo "Usage: videocall <start|stop>"
|
|
exit 1
|
|
}
|
|
|
|
move_workspace() {
|
|
swaymsg workspace "$1", move workspace to "$2"
|
|
}
|
|
|
|
main() {
|
|
if [ "$1" = "start" ]; then
|
|
move_workspace "3: " "HDMI-A-2"
|
|
move_workspace "2: " "eDP-1"
|
|
elif [ "$1" = "stop" ]; then
|
|
move_workspace "3: " "eDP-1"
|
|
move_workspace "2: " "HDMI-A-2"
|
|
else
|
|
usage
|
|
fi
|
|
}
|
|
|
|
if [ $# -lt 1 ]; then
|
|
usage
|
|
fi
|
|
|
|
action=$1
|
|
|
|
main "$action"
|