| title |
|---|
Tmux Popup Notes |
Ahhh, this is a good one — this is exactly the kind of terminal ergonomics question that separates casual tmux users from people who live in their terminal.
You’re basically asking:
“How do I open a small ‘box’ over my current running pane and run a command inside it?”
In tmux terminology, you’re looking for popups.
Since tmux 3.2, you can open a floating popup window over your current pane.
Inside tmux:
Ctrl-b :
Then type:
display-popup
This opens a floating shell.
Example:
Ctrl-b :
display-popup -E htop
-E → closes popup when command exits.
Or:
display-popup -E bash
You don’t want to type that every time.
Add to ~/.tmux.conf:
bind-key p display-popup -EReload:
Ctrl-b :
source-file ~/.tmux.conf
Now:
Ctrl-b p
→ Opens a popup shell.
display-popup -w 80% -h 60% -E lazygitWidth 80%, height 60%.
display-popup -w 100 -h 30 -E bashbind-key g display-popup -w 80% -h 80% -E lazygitGiven you:
- use Arch
- live in tmux
- like tight CLI workflows
Popups are ideal for:
lazygithtopnmtui- quick
pythonREPL - temporary debugging
- quick note writing
- GitHub CLI inspection
- interactive fzf search
It’s like having a modal tool without destroying your layout.
If you meant something like a smaller box inside the layout:
Horizontal split:
Ctrl-b "
Vertical split:
Ctrl-b %
But that changes layout permanently.
Popup does not.
You can combine:
display-popup -E "bash -c 'your-command; read'"So it stays open after command finishes.
If you want, I can also show you:
- How to make popups semi-transparent (KDE + Konsole specific)
- How to replicate Vim-style floating terminal behavior
- How to emulate GNU screen behavior (since you’ve compared them before)
- How to build a full “overlay toolkit” inside tmux
What exactly is your intended workflow for the box? Debugging? Monitoring? Quick commands?
Yes — and this is where tmux becomes very composable.
Short answer:
- ✅ You can trigger a popup from inside bash running in a tmux pane.
⚠️ You cannot dynamically resize an already-open popup (it must be recreated).
Let’s go precise.
From inside a tmux pane, just run:
tmux display-popup -EThat opens a popup shell over your current pane.
You can run any command:
tmux display-popup -w 80% -h 60% -E htopor
tmux display-popup -E "bash -c 'echo hello; read'"This works because inside a tmux pane:
$TMUXis settmuxclient attaches to current session automatically
You don’t need to specify -t.
Make a bash alias:
alias tpop='tmux display-popup -w 80% -h 60% -E'Then:
tpop lazygit
tpop htop
tpop pythonNow you’ve got modal tools anywhere.
Popups are not panes.
They are temporary overlays rendered by tmux’s display layer.
There is:
- no
resize-paneequivalent - no mouse resize
- no key resize
To change size → you must close and reopen.
Example:
tmux display-popup -w 90% -h 80% -E bashOr absolute size:
tmux display-popup -w 120 -h 40 -E bashIf you want something adaptive:
tmux display-popup -w "#{pane_width}" -h "#{pane_height}" -E bashOr smaller than current pane:
tmux display-popup -w "#{?pane_width,#{pane_width},80}" -h 70% -E bashtmux format strings work here.
Why you can’t resize:
- Popup is not part of layout tree
- It doesn’t participate in pane sizing
- It’s rendered independently
If you need:
- resizing
- splitting inside it
- long-running structured workflow
→ Use a normal pane instead.
Popups are ideal for:
- short-lived tools
- quick inspection
- modal utilities
You can run a new tmux session inside a popup:
tmux display-popup -w 80% -h 80% -E "tmux new-session -A -s scratch"Now inside popup you have:
- full tmux
- splits
- resizing
- persistent layout
Close popup → session keeps running.
That gives you a floating workspace.
Very powerful.
| Need | Use |
|---|---|
| Temporary command | Popup |
| Resize later | Pane |
| Structured mini workspace | tmux-in-popup |
| Replace screen-style workflow | Pane splits |
Given you’re on Arch + KDE Konsole + heavy tmux user:
If you tell me what your intended workflow is (debugging? Git? REPL? monitoring?), I can suggest the cleanest ergonomic pattern.