Script to set, increment through, or wrap through i3 or sway workspaces given a string of arguments
-i3 or sway (obviously)
-jq
-zenity (optional)
As seen in the i3 config file use cases may include:
bindsym $mod+Control+Escape exec set-i3-workspace.sh 1
bindsym $mod+Control+Shift+Escape exec set-i3-workspace.sh -c 1
bindsym $mod+Control+grave exec set-i3-workspace.sh "$(zenity --title='Workspace Selection' --entry --text='Please enter desired workspace.')"
bindsym $mod+Control+plus exec set-i3-workspace.sh +1
bindsym $mod+Control+minus exec set-i3-workspace.sh -1
bindsym $mod+Control+Up exec set-i3-workspace.sh +10
bindsym $mod+Control+Down exec set-i3-workspace.sh -10
bindsym $mod+Control+Right exec set-i3-workspace.sh -w10 +1
bindsym $mod+Control+Left exec set-i3-workspace.sh -w10 -1
Using the numeric keys on you keyboard to select a workspace within the 10's you are currently in: (freeze your face off cool)
bindsym $mod+Control+3 exec set-i3-workspace.sh -w10 3
bindsym $mod+Control+7 exec set-i3-workspace.sh -w10 7
bindsym $mod+Control+Shift+3 exec set-i3-workspace.sh -c -w10 3
bindsym $mod+Control+Shift+Right exec set-i3-workspace.sh -c -w10 +1
bindsym $mod+Control+Shift+plus exec set-i3-workspace.sh -c +1