placeholderTmux Floating Panes: Temporary Tasks Without Context Switching

Tmux Floating Panes: Temporary Tasks Without Context Switching

Tmux Popup Display/Menu & Floax Plugin

I’ve been trying out different terminal emulators lately, including:

  • Windows Terminal
  • Wezterm: Slow cold start, dropped
  • iTerm2
  • Kitty
  • Ghostty

Every terminal switch means re-learning and re-configuring a whole set of keybindings, which is tedious. So I use a terminal multiplexer like Zellij or Tmux to handle pane and tab management instead.

Zellij is quite full-featured and easy to configure, but it’s incompatible with Yazi’s image preview[1], so I dropped it after a while.

Why Popup?

The core idea of a popup/floating pane is a temporary, lightweight, focused interaction point.

Common short-lived terminal tasks — looking up a man page, scanning log output, making a git commit — traditionally require one of two approaches:

  1. Open a new fixed pane/window → close it after the task → return to your workspace
  2. Suspend the current task → run the temporary task → resume what you were doing

Both work, but they interrupt your workflow and hurt efficiency. The popup model offers a better solution: summon and dismiss a floating pane with a single keybind, without leaving your main workspace. Browser Company introduced the same feature in their Arc browser.

image.png
image.png

image.png
image.png

Configs

Built-in Popup

Tmux v3.2+ introduced the display-popup[2] command. You can bind it to a key with bind, e.g. bind g display-popup "lazygit" — pressing prefix + g opens lazygit in a popup.

I made a few tweaks for a better experience:

  • Use -d "#{pane_current_path}" to make the popup’s working directory match the current pane
    • For example, opening lazygit from ~/projects means lazygit also starts in ~/projects — no need to navigate to the repo inside lazygit
  • Use -w 80% -h 80% to set the popup to 80% of the current pane’s dimensions, making better use of screen space
  • Use -E to auto-close the popup when the shell command finishes

My most-used popup keybinds:

  • prefix + g: Open lazygit
  • prefix + S: Open the television tmux_sessions channel (for switching between tmux sessions)
  • prefix + m: Open rmpc (an MPD client)
tmux.conf
# Open lazygit popupbind g display-popup -d "#{pane_current_path}" -w 80% -h 80% -E "lazygit"# Open television session channelbind S display-popup -E "tv tmux_sessions"# Open Musicbind m display-popup -w 80% -h 80% -E "rmpc"

Additionally, display-menu[3] can create a menu. Example config:

# Quick access to dotfiles (terminal reloaded)bind x display-menu -T "#[align=centre]Dotfiles" -x C -y C \  "alias.nu"          a  "display-popup -w 80% -h 80% -E 'nvim ~/.config/nushell/aliases/alias.nu'" \  "config.nu"         n  "display-popup -w 80% -h 80% -E 'nvim ~/.config/nushell/config.nu" \  "Ghostty"           g  "display-popup -w 80% -h 80% -E 'nvim ~/.config/ghostty"\  "tmux.conf"         t  "display-popup -w 80% -h 80% -E 'nvim ~/.config/tmux/tmux.conf'" \  "Exit"              q  ""

Floax

Tmux’s built-in popup is decent, but has some drawbacks:

  • Zellij supports Toggle Floating Pane — press Alt + f to open/close a floating pane, while Tmux’s popup is not toggleable
  • Tmux popup doesn’t support allow-passthrough, so image preview in programs like Yazi won’t work

Floax is a Tmux plugin that partially addresses these pain points. Install it via tpm (Tmux Plugin Manager). Reference config:

tmux.conf
set -g @plugin 'omerxx/tmux-floax'set -g @floax-width '80%'set -g @floax-height '80%'set -g @floax-border-color 'magenta'set -g @floax-text-color 'blue'# Keybind for toggling the floating pane; -n means no prefix needed, just press Alt + fset -g @floax-bind '-n M-f'set -g @floax-change-path 'false'

Image preview in this plugin has some weird rendering issues though 🤦‍♂️, see the screenshot below:

tmux_image_preview_compare
tmux_image_preview_compare

Reference

For complete config, see: Efterklang/dotfiles: window & unix dotfiles


  1. See Image Preview | Yazi. Überzug++ can be installed as a workaround, but I experienced blurry images when using it. ↩︎

  2. Display a popup running shell-command on target-client. A popup is a rectangular box drawn over the top of any panes. Panes are not updated while a popup is present. From tmux(1) - Linux manual page ↩︎

  3. Display a menu on target-client. target-pane gives the target for any commands run from the menu. From tmux(1) - Linux manual page ↩︎

Display Settings

CompactRelaxed
Normal1.70

Comments