Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

struct libtmux-go latest

DisplayPopupRequest

DisplayPopupRequest configures a popup overlay. Pointer and map values are copied before I/O and must not be mutated concurrently. Pointer fields distinguish omission from an explicit empty value, with the Command and StartDirectory behavior documented on those fields.

Source and package
Qualified name
tmux.DisplayPopupRequest
Package
tmux
Distribution
github.com/libtmux/libtmux-go/tmux
Source
tmux/pane_popup.go
struct tmux.DisplayPopupRequest

Description#

CloseOnExit and CloseOnSuccess are mutually exclusive. CloseExisting asks tmux only to close the existing overlay, so the remaining fields do not create a replacement. NoBorder makes BorderLines ineffective. When modifying an existing popup, NoKeys clears its configured automatic-close flags before tmux applies CloseOnExit, CloseOnSuccess, and CloseOnAnyKey from this request. NoKeys does not disable keyboard input.

Fields18#

DisplayPopupRequest fields
NameTypeDescription
BorderLines *string BorderLines selects tmux's border-line style. NoBorder makes it ineffective.
BorderStyle *string BorderStyle selects the tmux style for the popup border.
CloseExisting bool CloseExisting closes the selected client's existing overlay and prevents this request from creating a replacement.
CloseOnAnyKey bool CloseOnAnyKey lets a nonmouse, nonpaste key dismiss the popup after its command has exited. It does not dismiss the popup while the job is active; tmux continues to send keys to that job.
CloseOnExit bool CloseOnExit closes the overlay whenever Command exits.
CloseOnSuccess bool CloseOnSuccess closes the overlay only when Command exits successfully.
Command *string Command is interpreted by tmux as a shell command. Nil lets tmux use default-command and then its default shell; nonnil empty is passed explicitly and tmux resolves it directly to the default shell.
Environment map[string]string Environment adds validated popup environment entries. Nil and an empty map add none; entries are sent in lexical key order.
Height *string Height is an explicit cell count or percentage and may contain tmux format expressions. Nil lets tmux choose the default height.
NoBorder bool NoBorder removes the popup border and makes BorderLines ineffective.
NoKeys bool NoKeys clears automatic-close flags previously configured on an existing popup. Same-request close flags are then applied, and key input remains enabled.
StartDirectory *string StartDirectory selects the popup working directory. Nil omits the option; nonnil empty is normalized to ".". The library expands a leading local ~ before tmux expands formats in the resulting value. A directory that does not exist is not an error: tmux starts the process in the home directory instead, or in / without one.
Style *string Style selects the tmux style for the popup interior.
TargetClient ClientName TargetClient selects the client that receives the overlay; zero lets tmux choose. tmux 3.8 and later refuses to host a popup on a control-mode client, which cannot render an overlay, so an explicit control-mode TargetClient is rejected on those versions rather than left as the silent no-op tmux itself returns.
Title *string Title is the popup title format. Nil leaves the tmux default.
Width *string Width is an explicit cell count or percentage and may contain tmux format expressions. Nil lets tmux choose the default width.
X *string X is a tmux popup position expression and may contain tmux formats. Nil lets tmux choose the horizontal position.
Y *string Y is a tmux popup position expression and may contain tmux formats. Nil lets tmux choose the vertical position.
Esc

Type to search.

Reference previewOpen reference