main 86ac9f6

Stacked panes for tmux with clean collapsed rows

tmux-stacked-panes

A tmux plugin for stacked panes with clean collapsed rows.

It keeps the active pane full size. Inactive panes are preserved in a hidden tmux session and shown as one-line placeholders, so you see useful labels instead of shell prompts.

GitHub: https://github.com/bnema/tmux-stacked-panes

Install with TPM

Add this before the final TPM run line in your tmux config:

set -g @plugin 'bnema/tmux-stacked-panes'

Reload tmux, then install plugins:

prefix + I

Usage

Create or add a stacked pane:

prefix + S

Move with your normal tmux pane navigation. When focus lands on a placeholder, the real pane is swapped back into view.

Options

# Key for creating or adding a stacked pane.
set -g @stacked-panes-key S

# Hidden session used to preserve inactive panes.
set -g @stacked-panes-hold-session '__tmux_stacked_panes'

How it works

The plugin stores stack state in tmux pane options:

  • @stacked-panes-id
  • @stacked-panes-active
  • @stacked-panes-role
  • @stacked-panes-real

Inactive panes live in the hidden session and are represented by placeholder panes such as:

○ stack 1:0 ~/projects/app

The plugin uses an after-select-pane hook to activate placeholders without replacing your existing navigation bindings.

Current limits

  • Vertical stacks only.
  • No automatic stacking on resize.
  • No detach command yet.
  • Manual break-pane, join-pane, or unusual layout changes can confuse a stack.

Development

make test

License

MIT

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. On pages with a side panel: into the panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit; in a file, click a line number to select it, shift-click for a range
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 0

    ↑↓ moveenter openesc close