brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: Ctrl-b w shows every window of every session as a tree

Tmux
~/tips/tip-tmux-choose-window

Ctrl-b w # sessions and windows

Opens a list of all tmux sessions and windows with a preview, so you can jump to any of them.

Past four windows the status bar gets crowded. The tree view is easier.

Ctrl-b w     # sessions and windows
Ctrl-b s     # sessions only

Move with the arrow keys, press Enter to jump, x to kill the highlighted entry after confirmation. A preview of the pane sits in the lower half.

The tree is the best overview tmux offers. Every session is a node, every window is a child with its name and a preview of what it shows, so you can find the one that was running your backup without opening each window. Use the arrow keys, or type the number shown next to an entry to jump to it.

From the tree you can also act on things. x kills the highlighted entry after a confirmation, t tags entries and Enter switches to the one you selected. The Z that appears briefly in the status bar is only because the tree view is shown zoomed over the window you were in.

The preview is a live view, so it can show things you did not mean to put on a shared screen.

Try it without risk: start a throwaway session with tmux new -s scratch, use the shortcut or command above there, look at what changes, and close the session again with tmux kill-session -t scratch. Nothing else on your machine is touched.

Further reading: tmux manual page (OpenBSD, official), tmux wiki: Getting Started (official), On this site: Ctrl-b l jumps back to the window you were just in, On this site: set -g renumber-windows on closes the gap when you close a window

More Tmux tips tmux new -d -s report -x 200 -y 50 'top' tmux wait-for build-done set -g allow-passthrough on tmux kill-server Ctrl-b [ All Tmux tips (125) All topics

Link