tmuxtmuxCLI Manual

Choose documentation 1

3.2a

tmux manual version

Latest (3.7c) 3.7c 3.2a
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

tmux display-menu

Display a menu on target-client.

Syntax

tmux display-menu [-O] [-c target-client] [-t target-pane] [-T title] [-x position] [-y position] name key command ...

Alias: menu.

Behavior

Display a menu on target-client. target-pane gives the target for any commands run from the menu.

A menu is passed as a series of arguments: first the menu item name, second the key shortcut (or empty for none) and third the command to run when the menu item is chosen. The name and command are formats, see the FORMATS and STYLES sections. If the name begins with a hyphen (-), then the item is disabled (shown dim) and may not be chosen. The name may be empty for a separator line, in which case both the key and command should be omitted.

-T is a format for the menu title (see FORMATS).

-x and -y give the position of the menu. Both may be a row or column number, or one of the following special values:

Both The centre of the terminal
The right side of the terminal
Both The bottom left of the pane
Both The mouse position
Both The window position on the status line
The line above or below the status line

Or a format, which is expanded including the following additional variables:

Each menu consists of items followed by a key shortcut shown in brackets. If the menu is too large to fit on the terminal, it is not displayed. Pressing the key shortcut chooses the corresponding item. If the mouse is enabled and the menu is opened from a mouse key binding, releasing the mouse button with an item selected chooses that item and releasing the mouse button without an item selected closes the menu. -O changes this behaviour so that the menu does not close when the mouse button is released without an item selected the menu is not closed and a mouse button must be clicked to choose an item.

The following keys are also available:

Choose selected item
Select previous item
Select next item
Exit menu

C implementation

Internal declarations in tmux 3.2a:

Use from a library

Each API describes its own defaults, errors and execution model.

tmux sources and license

Syntax comes from tmux 3.2a list-commands. See the global options for sockets and configuration, and command syntax and targets.

Behavior is taken from the tmux 3.2a manual.

Command declaration

Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Esc

Type to search.