Add videocall workspace screen switch script

This commit is contained in:
coolneng 2021-05-31 13:23:35 +02:00
parent c5c3bf3ac1
commit 9504037034
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 26 additions and 0 deletions

View File

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