Tmux - fast window switching across sessions

github logo ・1 min read

Tmux window switching

Tmux already makes it easy to switch windows in a session, however, it's hard to switch to windows from another session. To make window switching across sessions fast we can leverage fzf

  • Using fzf-tmux
  tmux list-windows -a -F "#S:#I-#W" | fzf-tmux | cut -d "-" -f 1 | xargs tmux switch-client -t
  • Binding it with .tmux.conf
  bind -n ^f run-shell "tmux list-windows -a -F \"##S:##I-##W\" | fzf-tmux | cut -d \"-\" -f 1 | xargs tmux switch-client -t"
twitter logo DISCUSS
Classic DEV Post from Sep 25 '18

How do you shift between the coding mindset and other head spaces?

Pratham profile image