tmux: Use combined session & pane selector
Taken from https://www.reddit.com/r/tmux/comments/rfae7o/navigate_sessions_windows_with_fzf/
This commit is contained in:
parent
8cc874b830
commit
44e1389066
1 changed files with 6 additions and 2 deletions
|
@ -86,8 +86,12 @@ bind -T copy-mode-vi r send-keys -X rectangle-toggle
|
||||||
# Save scrollback buffer to a file
|
# Save scrollback buffer to a file
|
||||||
bind S command-prompt -p 'Save history to filename:' -I '/tmp/tmux.history' 'capture-pane -S - -E -; save-buffer %1 ; delete-buffer'
|
bind S command-prompt -p 'Save history to filename:' -I '/tmp/tmux.history' 'capture-pane -S - -E -; save-buffer %1 ; delete-buffer'
|
||||||
|
|
||||||
# Session selector
|
# Session and Pane selector
|
||||||
bind T display-popup -E "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
|
bind T display-popup -E "tmux list-windows -a -F '#{session_name}:#{window_index} - #{window_name}' \
|
||||||
|
| grep -v \"^$(tmux display-message -p '#S')\$\" \
|
||||||
|
| fzf --reverse \
|
||||||
|
| sed -E 's/\s-.*$//' \
|
||||||
|
| xargs tmux switch-client -t"
|
||||||
|
|
||||||
# Last command output
|
# Last command output
|
||||||
set -g @command-capture-key t
|
set -g @command-capture-key t
|
||||||
|
|
Loading…
Reference in a new issue