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: tmux split-window -f adds a pane across the whole window

Tmux
~/tips/tip-tmux-full-width-split

tmux split-window -f -v -l 10

Adds a log strip under all your panes instead of under just one.

A normal split only cuts the pane you are in. With -f, tmux splits the whole window instead, so the new pane runs along the full width or height.

Say you have two panes side by side and want a log pane along the bottom, under both of them. A plain split-window cuts only one of the two. This does what I actually want:

tmux split-window -f -v -l 10

-v puts the new pane below, -f stretches it over every column, and -l 10 keeps it ten lines high. Use -h instead of -v for a full height pane on the right, and add -b to put it on the left or at the top.

As a key binding it becomes one keypress, and the pane opens in the folder you are already in:

bind J split-window -f -v -l 10 -c "#{pane_current_path}"

One thing to know: a later Ctrl-b Space or select-layout redistributes all panes, and your full width strip becomes an ordinary pane in the new layout. Layouts don’t remember how a pane was created.

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