diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index 1355f8a..8dfdf2c 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -29,6 +29,15 @@ bind K switch-client -p bind H switch-client -p bind L switch-client -n +# fzf pane switcher +bind f display-popup -w 80% -h 80% -E "\ + tmux list-panes -a -F '#{session_name}:#{window_index}.#{pane_index} #{session_name}/#{window_name} [#{pane_current_command}] #{pane_current_path}' \ + | fzf --reverse \ + --preview 'tmux capture-pane -ep -t {1}' \ + --preview-window right:60% \ + | awk '{print \$1}' \ + | xargs tmux switch-client -t" + # Auto-rename windows to the current running command set -g automatic-rename on set -g automatic-rename-format '#{b:pane_current_path}'