From c093a4ea37a7973d72115a8ee70517ca8ea489dc Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 22 Jan 2025 14:52:14 +0100 Subject: [PATCH] tmux: Select last window with prefix+[0-9] too This is already the case with M-[0-9]. prefix+0 was also still selecting window 0. --- .config/tmux/tmux.conf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index d5ac7fd..61a083b 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -176,6 +176,19 @@ bind -n MouseDragEnd1StatusDefault { bind -r \{ swap-pane -U bind -r \} swap-pane -D +# Select last window if target is current +bind 1 select-window -T -t 1 +bind 2 select-window -T -t 2 +bind 3 select-window -T -t 3 +bind 4 select-window -T -t 4 +bind 5 select-window -T -t 5 +bind 6 select-window -T -t 6 +bind 7 select-window -T -t 7 +bind 8 select-window -T -t 8 +bind 9 select-window -T -t 9 +# Since base-index == 1, 0 should go to window 10 +bind 0 select-window -T -t 10 + # Select windows with Alt-[0-9], select last window if target is current bind -n M-1 select-window -T -t 1 bind -n M-2 select-window -T -t 2