DEV Community

pr4th4m
pr4th4m

Posted on

Tmux - fast window switching across sessions

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
Enter fullscreen mode Exit fullscreen mode
  • 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"
Enter fullscreen mode Exit fullscreen mode

Top comments (0)