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




Keep Learning with Me

Follow me on Facebook and Twitter or jump into Telegram chat!:
Recommended Software
I use Brave browser, it's awesome: Brave Browser I'm also a fan of SetApp for macOS: SetApp for macOS
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
18 Jun 2021

CentOS 8.4 Released

17 Jun 2021

yum/dnf Package Manager Basics

07 Jun 2021

/proc/mdstat

Recent Tweets