# libtmux.Pane.display_popup

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/pane.py#L1644
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-pane-display_popup/

tmux command: [`display-popup`](/en/tmux/latest/manual/display-popup/)

```
libtmux.Pane.display_popup(
    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
```

Display a popup overlay via [`$ tmux display-popup`](/en/tmux/latest/manual/display-popup/).

Requires tmux 3.2+ and an attached client. Use
:class:`~libtmux._internal.control_mode.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.

```python
>>> 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+.

## In other ports

### Open a popup over the client showing a pane

- TypeScript: [`pane.Pane.displayPopup`](/en/ts/latest/reference/pane-pane-displaypopup/) (method)
- Go: [`tmux.Pane.DisplayPopup`](/en/go/latest/reference/tmux-pane-displaypopup/) (method)
- C#: [`LibTmux.Pane.DisplayPopupAsync`](/en/csharp/latest/reference/libtmux-pane-displaypopupasync/) (method)
