diff --git a/scripts/.local/share/scripts/videocall b/scripts/.local/share/scripts/videocall index 4fa9f01..7ffb0d5 100755 --- a/scripts/.local/share/scripts/videocall +++ b/scripts/.local/share/scripts/videocall @@ -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"