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 E spreads tmux panes out evenly without changing the layout

Tmux
~/tips/tip-tmux-spread-panes-evenly

Ctrl-b E

Evens out pane sizes while keeping your own arrangement.

After a few splits and resizes, panes end up with odd sizes. Picking a preset layout fixes the sizes but throws away the arrangement you made.

Ctrl-b E

This runs select-layout -E, which keeps the structure of your panes and only shares the space evenly between neighbours. Three panes side by side each get a third. A column of two under one wide pane stays a column of two, at equal heights.

It works on the current pane and the panes next to it in the same split, so where you press it matters a little.

From the command line it is the same command:

tmux select-layout -E

I like it after a split-window of a pane that was already narrow, because the new pane gets only half of that small space. One Ctrl-b E gives it a fair share.

If you need panes evenly spread across the whole window regardless of how they were split, the presets are the better tool: even-horizontal, even-vertical or tiled. Those do reorganise everything.

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