libtmux Reference MCP Search
On this page

libtmux.Pane.display_popup

View as Markdown

Module
libtmux
Declared in
Pane
Package
libtmux
Source
src/libtmux/pane.py
display_popup
( 19 parameters ) ( self , command : str | None = None , close_on_exit : bool | None = None , close_on_success : bool | None = None , close_existing : bool | None = None , target_client : str | None = None , width : int | str | None = None , height : int | str | None = None , x : int | str | None = None , y : int | str | None = None , start_directory : StrPath | None = None , title : str | None = None , border_lines : str | None = None , style : str | None = None , border_style : str | None = None , environment : dict[str, str] | None = None , no_border : bool | None = None , close_on_any_key : bool | None = None , no_keys : bool | None = None )
None
method [source]
method [source]
display_popup

Display a popup overlay via $ tmux display-popup.

Requires tmux 3.2+ and an attached client. Use ControlMode in tests to provide a client.

Examples

Not directly testable — popup rendering requires a TTY-backed client. Control-mode provides an attached client for invocation but the popup itself is not visible or verifiable.

>>> with control_mode() as ctl:
...     pane.display_popup(command='true', close_on_exit=True)
Parameters
  • command ( str | None ) – Shell command to run in the popup.

  • close_on_exit ( bool | None ) – Close popup when command exits (-E flag).

  • close_on_success ( bool | None ) – Close popup only on success exit code (-EE flag, passing -E twice).

  • close_existing ( bool | None ) – Close any existing popup on the client (-C flag).

  • target_client ( str | None ) – Display the popup on this specific client (-c flag). When omitted, tmux selects the client attached to this pane's session. With multiple clients attached, pass *target_client* to direct the popup at one of them.

  • width ( int | str | None ) – Popup width (-w flag).

  • height ( int | str | None ) – Popup height (-h flag).

  • x ( int | str | None ) – Popup x position (-x flag).

  • y ( int | str | None ) – Popup y position (-y flag).

  • start_directory ( StrPath | None ) – Working directory (-d flag).

  • title ( str | None ) – Popup title (-T flag). Requires tmux 3.3+.

  • border_lines ( str | None ) – Border line style (-b flag). Requires tmux 3.3+.

  • style ( str | None ) – Popup style (-s flag). Requires tmux 3.3+.

  • border_style ( str | None ) – Border style (-S flag). Requires tmux 3.3+.

  • environment ( dict[str, str] | None ) – Environment variables (-e flag). Requires tmux 3.3+.

  • no_border ( bool | None ) – Open the popup without a border (-B flag). If *border_lines* is also set, tmux ignores it. Requires tmux 3.3+.

  • close_on_any_key ( bool | None ) – Dismiss the popup on any key press once the inner command has exited (-k flag). Requires tmux 3.6+.

  • no_keys ( bool | None ) – Do not auto-close the popup on any close-trigger keys (-N flag). Requires tmux 3.6+.

0 declared, 0 inherited

Esc

Type to search.