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