To create a popup window in tmux (version 3.2+), use the display-popup
command followed by the shell command you want to run.
Opens a basic popup with ping google.com
Opens a large centered popup with your default shell
Opens htop in a large popup
Popup windows are a powerful feature introduced in tmux 3.2 that allow you to temporarily open floating windows for running commands, viewing information, or performing quick tasks without disrupting your current layout.
Popups appear centered by default, floating above your terminal content. They can be customized in size, position, and appearance, and will close when you press Escape or when the command completes (with -E
option).
The basic syntax for creating a popup is:
display-popup [options] [command]
If no command is specified, it opens your default shell. The popup will close when you press Escape or when the command exits (if -E
is used).
Customize your popups with these options:
-w 80
or -w 50%
-h 20
or -h 60%
-x 10
or -x C
for center-y 5
or -y C
for centerHere are some useful examples of popup windows:
Opens a fuzzy finder in a popup to quickly find and edit files
Launch htop process viewer in a popup for quick system monitoring
Open a quick note file in a popup editor without disrupting your workflow
Create a large popup shell that takes up most of your screen
Check git status in a large popup that waits for input before closing
Add these to your ~/.tmux.conf
for quick access to popups:
# Add to ~/.tmux.conf # Open shell in a popup with Ctrl+b T bind-key T display-popup -E # Open htop in a popup with Ctrl+b H bind-key H display-popup -E "htop" # Open a large popup with Ctrl+b P bind-key P display-popup -w 80% -h 80% -E
Popups can also run tmux commands to display information about your session:
display-popup -E "tmux list-sessions | cat"
display-popup -E "tmux list-windows | cat"
display-popup -E "tmux list-keys | cat"
Popup windows are a powerful addition to tmux that can significantly improve your workflow by allowing you to quickly access information or run commands without disrupting your current layout.
Experiment with different options and key bindings to find what works best for you. Popups are especially useful for quick tasks that don't require a full pane or window.