Posted on (↻ ).

Using tmux-select-window from tmux-tools.

Switches to the specified window. If the window does not exist, it will be created.

Switch to window:

~/.tmux.conf

bind-key 1 run-shell 'tmux-select-window 1'
bind-key 2 run-shell 'tmux-select-window 2'
bind-key 3 run-shell 'tmux-select-window 3'
bind-key 4 run-shell 'tmux-select-window 4'
bind-key 5 run-shell 'tmux-select-window 5'
bind-key 6 run-shell 'tmux-select-window 6'
bind-key 7 run-shell 'tmux-select-window 7'
bind-key 8 run-shell 'tmux-select-window 8'
bind-key 9 run-shell 'tmux-select-window 9'
bind-key 0 run-shell 'tmux-select-window 10'

Discussion: reddit • tmux • Switch or create workspace

See also Move pane to window.