Preview Windows and Sessions in tmux

tmux tmux

In addition to listing all current sessions, it’s possible to list tmux sessions along with windows in each one of them. I’ve discovered windows preview in tmux last month, but this time researched the topic further.

tmux Key Bindings for Windows and Sessions Previews This time around I have actually learned how each of the keybindings is called, so adding the following two lines to .tmux.conf will get you the desired effect:

bind-key s choose-tree -Zs
bind-key w choose-tree -Zw

As you can see from the description, these bindings are for Meta + s and Meta + w key combinations (read here: confirm and change your tmux meta key).

tmux Sessions Preview

Just like the last time, Meta + s shows the list of sessions and bottom of the screen shows window previews:

tmux sessions preview tmux sessions preview

But I’ve learned that there’s another mode of viewing windows and sessions: the one that shows you a full list of windows in a tree-like structure.

tmux Windows Preview

In this new (to me) mode, you can selet any of the window from the list and the preview section in the bottom section of the tmux screen will show you a preview of that window:

tmux windows preview tmux windows preview

So the difference to previous mode is that you preview just one selected window instead of all the winows in the session.

I think that’s a pretty cool mode, especially since it shows windows and their names – really helps on busy servers where I have dozens of tmux windows and sessions.

See Also

Contact Me

Follow me on Facebook, Twitter or Telegram:
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!
Recent Articles
24 Mar 2024

Homelab: Mac Pro 2013 32GB

30 Sep 2023

macOS Sonoma 14.0

26 Sep 2023

Video: What Browser Do You Use?

Recent Tweets