Skip to content

Tmux list-panes

Basics

tmux list-panes -a -F '#{p40:session_name} #{p20:window_name} #{=20;p20:pane_current_command} #{session_id}:#{window_id}.#{p20:pane_id}'
session12                                editor               nvim                 $4:@12.%20
session12                                editor               zsh                  $4:@12.%22
session12                                sh                   bash                 $4:@13.%21
dotfiles                                 editor               nvim                 $5:@14.%23
dotfiles                                 editor               zsh                  $5:@14.%25

The last column can be used to directly jump to a specific pane, like

tmux switch-client -t <ADDRESS>
tmux list-panes -a -F '#{p40:session_name} #{=20;p20:[ #{pane_current_command} ]}'
session12                                [ nvim ]
session12                                [ zsh ]
session12                                [ bash ]
dotfiles                                 [ nvim ]
dotfiles                                 [ zsh ]