3 curr_ws
=$
(swaymsg
-t get_workspaces | jq
-r '.[] | select(.focused==true).name')
4 [ "$curr_ws" -eq 1 ] && prev_ws
=10 || prev_ws
=$
((curr_ws-1
))
5 [ "$curr_ws" -eq 10 ] && next_ws
=1 || next_ws
=$
((curr_ws
+1))
9 if [ "$1" = "switch" ] ||
[ "$1" = "move" ]; then
11 if [ "$2" = "prev" ]; then
13 elif [ "$2" = "next" ]; then
16 echo "Usage: $0 $1 {prev|next} [follow]"
20 echo "Usage: $0 {switch|move} {prev|next} [follow]"
24 if [ "$op" = "switch" ]; then
25 sway workspace
"$dest_ws"
26 elif [ "$op" = "move" ]; then
27 sway move container to workspace
"$dest_ws"
28 if [ "$3" = "follow" ]; then
29 sway workspace
"$dest_ws"