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: window-style dims the tmux panes you are not working in

Tmux
~/tips/tip-tmux-dim-inactive-panes

set -g window-style 'fg=colour247,bg=colour236'

Greys out inactive panes so the active one stands out.

Pane borders are thin. A faster way to see where you are typing is to give inactive panes a slightly different background.

set -g window-style 'fg=colour247,bg=colour236'
set -g window-active-style 'fg=terminal,bg=terminal'

window-style applies to every pane. window-active-style overrides it for the active pane, and terminal means your terminal’s own colours. So the pane you are in looks normal and the rest go a bit grey.

The numbers are from the 256 colour palette, where colour232 to colour255 run from almost black to almost white. On a light theme I’d flip it and use something like bg=colour254 for the inactive panes.

Programs that paint their own background, such as Vim with a colour scheme or htop, will cover this up. In those panes you only see the effect around the edges, if at all.

Since tmux 3.0 these are pane options too, so you can give a single pane its own colour with set -p. A red tint on a pane that is logged in to a production server is a nice reminder of where you are:

set -p window-style 'bg=colour52'

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