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: main-pane-width sets how big the main pane in a tmux layout gets

Tmux
~/tips/tip-tmux-main-pane-width

set -g main-pane-width 60%

Controls the size of the big pane in the main layouts.

The main-vertical layout puts one big pane on the left and stacks the rest on the right. The trouble is the default width of the big pane, which is a fixed 80 columns.

set -g main-pane-width 60%
set -g main-pane-height 70%

main-pane-width is used by main-vertical, and main-pane-height by main-horizontal, where the big pane sits on top. A percentage scales with your window, which I prefer on a wide monitor. Plain numbers are columns or lines.

Setting the option doesn’t change anything on screen yet. Apply the layout to see it:

tmux select-layout main-vertical

or press Ctrl-b Alt-4. The pane that becomes the main one is the active pane, so move into your editor first.

These are window options, which means set -g in your config is the default for all windows, and a plain set without -g changes only the window you are in. If a window seems to ignore your config, a window level value is probably overriding it; tmux show -w main-pane-width shows it.

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