tmux: enforce prefix+number window switching

This commit is contained in:
Thomas Naderer
2026-02-21 22:25:30 +01:00
parent 6d691fd94e
commit 2229f7741b

View File

@@ -222,6 +222,18 @@ source-file ~/.config/tmux/themes/gruvbox.tmux
# Toggle top status bar on/off (Prefix + b) # Toggle top status bar on/off (Prefix + b)
bind b if -F "#{==:#{status},on}" "set -g status off ; set -g pane-border-status off" "set -g status on ; set -g pane-border-status top" bind b if -F "#{==:#{status},on}" "set -g status off ; set -g pane-border-status off" "set -g status on ; set -g pane-border-status top"
# Window switching with Prefix + number
bind-key -T prefix 1 select-window -t :=1
bind-key -T prefix 2 select-window -t :=2
bind-key -T prefix 3 select-window -t :=3
bind-key -T prefix 4 select-window -t :=4
bind-key -T prefix 5 select-window -t :=5
bind-key -T prefix 6 select-window -t :=6
bind-key -T prefix 7 select-window -t :=7
bind-key -T prefix 8 select-window -t :=8
bind-key -T prefix 9 select-window -t :=9
bind-key -T prefix 0 select-window -t :=10
# Theme switcher (Prefix + Shift+1/2/3 => !/@/#) # Theme switcher (Prefix + Shift+1/2/3 => !/@/#)
bind ! source-file ~/.config/tmux/themes/gruvbox.tmux bind ! source-file ~/.config/tmux/themes/gruvbox.tmux
bind @ source-file ~/.config/tmux/themes/catppuccin.tmux bind @ source-file ~/.config/tmux/themes/catppuccin.tmux