Extend agent-nav.sh to also work with windows indices
This commit is contained in:
13
tmux.conf
13
tmux.conf
@@ -112,6 +112,19 @@ bind C-p if -F '#{==:#{session_name},agent}' {
|
||||
previous-window
|
||||
}
|
||||
|
||||
# Numbered window selection. Inside the agent popup the number addresses the
|
||||
# underlying session's windows, doing nothing if that window has no agent window.
|
||||
bind 0 if -F '#{==:#{session_name},agent}' "run -b '~/.config/tmux/agent-nav.sh 0'" 'select-window -t :=0'
|
||||
bind 1 if -F '#{==:#{session_name},agent}' "run -b '~/.config/tmux/agent-nav.sh 1'" 'select-window -t :=1'
|
||||
bind 2 if -F '#{==:#{session_name},agent}' "run -b '~/.config/tmux/agent-nav.sh 2'" 'select-window -t :=2'
|
||||
bind 3 if -F '#{==:#{session_name},agent}' "run -b '~/.config/tmux/agent-nav.sh 3'" 'select-window -t :=3'
|
||||
bind 4 if -F '#{==:#{session_name},agent}' "run -b '~/.config/tmux/agent-nav.sh 4'" 'select-window -t :=4'
|
||||
bind 5 if -F '#{==:#{session_name},agent}' "run -b '~/.config/tmux/agent-nav.sh 5'" 'select-window -t :=5'
|
||||
bind 6 if -F '#{==:#{session_name},agent}' "run -b '~/.config/tmux/agent-nav.sh 6'" 'select-window -t :=6'
|
||||
bind 7 if -F '#{==:#{session_name},agent}' "run -b '~/.config/tmux/agent-nav.sh 7'" 'select-window -t :=7'
|
||||
bind 8 if -F '#{==:#{session_name},agent}' "run -b '~/.config/tmux/agent-nav.sh 8'" 'select-window -t :=8'
|
||||
bind 9 if -F '#{==:#{session_name},agent}' "run -b '~/.config/tmux/agent-nav.sh 9'" 'select-window -t :=9'
|
||||
|
||||
# Kill current window
|
||||
bind W kill-window
|
||||
|
||||
|
||||
Reference in New Issue
Block a user