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: set -g pane-scrollbars modal shows a scrollbar in tmux copy mode

Tmux
~/tips/tip-tmux-pane-scrollbars

set -g pane-scrollbars modal

Shows where you are in a pane's history while scrolling.

In copy mode tmux shows a line counter in the corner, but I find a scrollbar easier to read at a glance. Since tmux 3.6, panes can have one.

set -g pane-scrollbars modal

With modal, a thin scrollbar appears while a pane is in copy mode or view mode and disappears again after a moment of not scrolling. The slider shows how much of the history is on screen and where you are. With the mouse on, you can drag it too.

The other values are on, which shows it permanently and makes every pane one column narrower, and auto-hide, which keeps it available all the time but hides it when you are not using it. A few options tune it:

set -g pane-scrollbars-position left
set -g pane-scrollbars-style 'fg=colour250,bg=colour237'

The style’s foreground colour is the slider and the background is the track.

Check your version first with tmux -V. Many distributions still ship 3.4 or 3.5, and there the option doesn’t exist, so a config with this line will show an error at startup. Wrap it in if-shell or keep it in a separate file if you share your config between machines.

Further reading: tmux manual page (OpenBSD)

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