Refactor videocall script
This commit is contained in:
parent
9504037034
commit
f2122ddb41
|
@ -5,13 +5,17 @@ usage() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
move_workspaces() {
|
||||
move_workspace() {
|
||||
swaymsg workspace "$1", move workspace to "$2"
|
||||
}
|
||||
|
||||
main() {
|
||||
if [ "$1" = "start" ]; then
|
||||
swaymsg workspace "3: ", move workspace to HDMI-A-2
|
||||
swaymsg workspace "2: ", move workspace to eDP-1
|
||||
move_workspace "3: " "HDMI-A-2"
|
||||
move_workspace "2: " "eDP-1"
|
||||
elif [ "$1" = "stop" ]; then
|
||||
swaymsg workspace "3: ", move workspace to eDP-1
|
||||
swaymsg workspace "2: ", move workspace to HDMI-A-2
|
||||
move_workspace "3: " "eDP-1"
|
||||
move_workspace "2: " "HDMI-A-2"
|
||||
else
|
||||
usage
|
||||
fi
|
||||
|
@ -23,4 +27,4 @@ fi
|
|||
|
||||
action=$1
|
||||
|
||||
move_workspaces "$action"
|
||||
main "$action"
|
||||
|
|
Loading…
Reference in New Issue