How to target the right tmux pane by number?
A bare number in a tmux pane target means a pane of the current window when that pane exists, otherwise a whole window, and it flips silently. Qualify with window.pane, a pane id, or a window name.
The terminal as a working environment: multiplexers, panes, and sessions that outlive a connection.
10 articles tagged with "Terminal"
A bare number in a tmux pane target means a pane of the current window when that pane exists, otherwise a whole window, and it flips silently. Qualify with window.pane, a pane id, or a window name.
Windows and panes start at 0 by default, so the leftmost one sits under a key at the far end of the keyboard. Set base-index and pane-base-index to 1 in ~/.tmux.conf so key 1 selects the first one.
The mouse is off by default. Add set -g mouse on to ~/.tmux.conf, then drag to select and copy into the tmux buffer. Hold Shift to fall back to the terminal's own selection.
Use resize-pane with -L/-R/-U/-D to push a border by N cells, or -x/-y to set an exact size. A resize only works when there is a neighbour to trade space with.
Press Ctrl-A z to expand the active pane to the whole window, and again to restore the split. Nothing closes, it is a temporary toggle.
Press Ctrl-A ; to toggle focus between the current pane and the one you were on just before, the pane-level twin of Ctrl-A l for windows.
Use Ctrl-A then an arrow key for directional focus, Ctrl-A o to cycle panes, and Ctrl-A q to jump by number.
Use monitor-activity to flag a window when output appears, or monitor-silence to flag it when output stops, so you can watch a long job from another window.
tmux renames windows after the running program by default. Turn automatic-rename off to keep the names you set.
Repack tmux window indexes to 0, 1, 2 with move-window -r, or set renumber-windows on to do it automatically.