API reference
Browse the Rust types and operations for working with tmux. Start with the core objects below, or search for a type or member.
Server 13 types
A cloneable handle to one captured tmux server endpoint.
Whether an AccessRule names an operating-system user or group.
One entry of the server's access list.
What came of waiting on a wait-for channel.
One of tmux's interactive choosers.
A consuming builder for one inert Server handle.
One session and everything under it, from Server::hierarchy().
One window and its panes, from Server::hierarchy().
Typed filter handles for SessionTree.
Typed filter handles for WindowTree.
One line of a Server::display_menu() menu.
Which tmux daemon is answering on an endpoint.
The structural identity of one tmux server endpoint.
Session 4 types
One tmux session, together with the snapshot it was discovered with.
Where a new window goes, relative to the index it is given.
A session name tmux can address.
A native tmux session ID such as $1.
Window 4 types
Pane 4 types
One tmux pane, as reached through one window link.
What came of waiting for a pane to do something.
Which way to move focus among a window's panes.
A native tmux pane ID such as %1.
Client 1 type
One client attached to the tmux server.
Hooks 1 type, 1 function or constant
The values one array option holds, by the index tmux stores them under.
The commands one hook name holds.
Options 4 types
Which table an option primarily lives in.
What tmux declares about one option.
Why a typed option write was refused before it reached tmux.
One option's value, typed by what tmux's own option table declares.
Options — Functions 1 function or constant
Look up what tmux declares about one option.
Options — Constants and variables 217 functions and constants
tmux's activity-action option.
tmux's after-bind-key option.
tmux's after-capture-pane option.
tmux's after-copy-mode option.
tmux's after-display-message option.
tmux's after-display-panes option.
tmux's after-kill-pane option.
tmux's after-list-buffers option.
tmux's after-list-clients option.
tmux's after-list-keys option.
tmux's after-list-panes option.
tmux's after-list-sessions option.
tmux's after-list-windows option.
tmux's after-load-buffer option.
tmux's after-lock-server option.
tmux's after-new-session option.
tmux's after-new-window option.
tmux's after-paste-buffer option.
tmux's after-pipe-pane option.
tmux's after-queue option.
tmux's after-refresh-client option.
tmux's after-rename-session option.
tmux's after-rename-window option.
tmux's after-resize-pane option.
tmux's after-resize-window option.
tmux's after-save-buffer option.
tmux's after-select-layout option.
tmux's after-select-pane option.
tmux's after-select-window option.
tmux's after-send-keys option.
tmux's after-set-buffer option.
tmux's after-set-environment option.
tmux's after-set-hook option.
tmux's after-set-option option.
tmux's after-show-environment option.
tmux's after-show-messages option.
tmux's after-show-options option.
tmux's after-split-window option.
tmux's after-unbind-key option.
tmux's aggressive-resize option.
tmux's alert-activity option.
tmux's alert-bell option.
tmux's alert-silence option.
tmux's allow-passthrough option.
tmux's allow-rename option.
tmux's allow-set-title option.
tmux's alternate-screen option.
tmux's assume-paste-time option.
tmux's automatic-rename option.
tmux's automatic-rename-format option.
tmux's base-index option.
tmux's bell-action option.
tmux's buffer-limit option.
tmux's client-active option.
tmux's client-attached option.
tmux's client-dark-theme option.
tmux's client-detached option.
tmux's client-focus-in option.
tmux's client-focus-out option.
tmux's client-light-theme option.
tmux's client-resized option.
tmux's client-session-changed option.
tmux's clock-mode-colour option.
tmux's clock-mode-style option.
tmux's codepoint-widths option.
tmux's command-alias option.
tmux's command-error option.
tmux's copy-command option.
tmux's copy-mode-current-line-number-style option.
tmux's copy-mode-current-match-style option.
tmux's copy-mode-line-number-style option.
tmux's copy-mode-line-numbers option.
tmux's copy-mode-mark-style option.
tmux's copy-mode-match-style option.
tmux's copy-mode-position-format option.
tmux's copy-mode-position-style option.
tmux's copy-mode-selection-style option.
tmux's cursor-colour option.
tmux's cursor-style option.
tmux's default-client-command option.
tmux's default-command option.
tmux's default-shell option.
tmux's default-size option.
tmux's default-terminal option.
tmux's destroy-unattached option.
tmux's detach-on-destroy option.
tmux's display-panes-active-colour option.
tmux's display-panes-colour option.
tmux's display-panes-time option.
tmux's display-time option.
tmux's escape-time option.
tmux's exit-empty option.
tmux's exit-unattached option.
tmux's extended-keys option.
tmux's extended-keys-format option.
tmux's fill-character option.
tmux's focus-events option.
tmux's focus-follows-mouse option.
tmux's get-clipboard option.
tmux's history-file option.
tmux's history-limit option.
tmux's initial-repeat-time option.
tmux's input-buffer-size option.
tmux's lock-after-time option.
tmux's lock-command option.
tmux's main-pane-height option.
tmux's main-pane-width option.
tmux's menu-border-lines option.
tmux's menu-border-style option.
tmux's menu-selected-style option.
tmux's menu-style option.
tmux's message-command-style option.
tmux's message-format option.
tmux's message-limit option.
tmux's message-line option.
tmux's message-style option.
tmux's mode-style option.
tmux's monitor-activity option.
tmux's monitor-bell option.
tmux's monitor-silence option.
tmux's other-pane-height option.
tmux's other-pane-width option.
tmux's pane-active-border-style option.
tmux's pane-base-index option.
tmux's pane-border-format option.
tmux's pane-border-indicators option.
tmux's pane-border-lines option.
tmux's pane-border-status option.
tmux's pane-border-style option.
tmux's pane-colours option.
tmux's pane-exited option.
tmux's pane-focus-in option.
tmux's pane-focus-out option.
tmux's pane-mode-changed option.
tmux's pane-scrollbars option.
tmux's pane-scrollbars-position option.
tmux's pane-scrollbars-style option.
tmux's pane-set-clipboard option.
tmux's pane-status-current-style option.
tmux's pane-status-style option.
tmux's pane-title-changed option.
tmux's popup-border-lines option.
tmux's popup-border-style option.
tmux's popup-style option.
tmux's prefix-timeout option.
tmux's prompt-command-cursor-style option.
tmux's prompt-cursor-colour option.
tmux's prompt-cursor-style option.
tmux's prompt-history-limit option.
tmux's remain-on-exit option.
tmux's remain-on-exit-format option.
tmux's renumber-windows option.
tmux's repeat-time option.
tmux's scroll-on-clear option.
tmux's session-closed option.
tmux's session-created option.
tmux's session-renamed option.
tmux's session-status-current-style option.
tmux's session-status-style option.
tmux's session-window-changed option.
tmux's set-clipboard option.
tmux's set-titles option.
tmux's set-titles-string option.
tmux's silence-action option.
tmux's status-format option.
tmux's status-interval option.
tmux's status-justify option.
tmux's status-keys option.
tmux's status-left option.
tmux's status-left-length option.
tmux's status-left-style option.
tmux's status-position option.
tmux's status-right option.
tmux's status-right-length option.
tmux's status-right-style option.
tmux's status-style option.
tmux's synchronize-panes option.
tmux's terminal-features option.
tmux's terminal-overrides option.
tmux's tiled-layout-max-columns option.
tmux's tree-mode-preview-format option.
tmux's tree-mode-preview-style option.
tmux's update-environment option.
tmux's variation-selector-always-wide option.
tmux's visual-activity option.
tmux's visual-bell option.
tmux's visual-silence option.
tmux's window-active-style option.
tmux's window-linked option.
tmux's window-pane-current-status-format option.
tmux's window-pane-status-format option.
tmux's window-size option.
tmux's window-status-activity-style option.
tmux's window-status-bell-style option.
tmux's window-status-current-format option.
tmux's window-status-current-style option.
tmux's window-status-format option.
tmux's window-status-last-style option.
tmux's window-status-separator option.
tmux's window-status-style option.
tmux's window-style option.
tmux's window-unlinked option.
tmux's word-separators option.
tmux's wrap-search option.
tmux's xterm-keys option.
Keys and bindings 1 type
One key binding, as tmux holds it.
Layout and geometry 5 types
Where a split puts the new pane, relative to the one being divided.
One of the pane arrangements tmux knows by name.
What to arrange a window's panes as.
Where a split puts the pane it makes.
Which edge a resize moves.
Environment 1 type
What a session's environment holds for one name.
Terminal capabilities 1 type
Immutable capability state detected for one configured tmux executable.
Versions 3 types, 11 functions and constants
The suffix of a numbered tmux release.
A numbered tmux release.
A parsed raw tmux version.
capture-pane -T, and so crate::CaptureOptions::trim_blank_cells().
list-clients leaving out a client that is stopped rather than gone, and so crate::Error::ClientSuspended being reachable at all.
refresh-client -l, which asks an attached client's terminal for its clipboard.
Managed control acquisition, decided before -C.
Taking a pane out of a control client's stream without crashing the server, and so crate::control::ControlSender::mute_pane() using off.
window_layout and select-layout using a JSON subset instead of the classic checksum-prefixed string, and so crate::LayoutSpec::Saved accepting one.
The mirrored layouts, and so crate::Layout::MainHorizontalMirrored and crate::Layout::MainVerticalMirrored.
Exact delete-buffer -b and set-buffer -b -n identity.
pane-border-style and pane-active-border-style becoming pane options as well as window ones, below it tmux stores them only per window, and a write sent with -p lands there instead -- reporting success for a change the caller did not ask for. See crate::OptionSchema::accepts().
Commands 5 types
A logical tmux command with classified diagnostic arguments.
Several tmux commands dispatched as one tmux a \; b invocation.
A rendering of a dispatched command that is safe to log.
How much work one server may have in flight at once.
Text bound for a tmux argument that tmux expands as a format.
Control mode 6 types
What a subscription watches.
Sends commands down a control-mode connection.
Receives tmux notifications and terminal connection errors.
What one pane writes, as it writes it.
How many persistent control-mode clients one server may hold.
What one control-mode connection may accumulate before it gives up.
Formats 1 type, 1 function or constant
Immutable text bytes returned by tmux.
Escape text so tmux uses it as written rather than expanding it.
Queries 9 types, 8 functions and constants
A predicate that evaluates a borrowed candidate.
Cardinality and named-predicate operations for native iterators.
Stable string semantics for a custom enum filter field.
A type with a stable schema that can evaluate portable filter predicates.
A filter target whose portable expression grammar can be described.
One target and every field its decoder accepts.
The value or relation family behind one filter field.
Construct a boolean handle for generated code.
Construct a custom enum handle for generated code.
Return generated metadata for one related target.
Construct an integer handle for generated code.
Construct a to-many relation handle for generated code.
Construct a to-one relation handle for generated code.
Construct a text handle for generated code.
Construct the source-less generated fallback for an unknown field.
Queries — Fields 6 types
One accepted field and the predicates valid for it.
Queries — Expressions 2 types
An opaque, portable predicate over candidates of type T.
One opaque predicate passed to generated candidate dispatch.
Snapshots 5 types
One line of a capture, with what tmux knows about it.
Read a pane's contents.
A snapshot field's value, or the reason the snapshot holds none.
Closed progress-state vocabulary tmux emits for a pane's progress bar.
Keeps super::ReadField implemented by this crate's handles only.
Workspaces 7 types
What an operation does to tmux state.
How an operation directly affects tmux objects.
Set a tmux option.
Set a variable in a session's environment.
Send text or named keys to a pane.
Wait before the next operation runs.
Rearrange a window's panes into a named or described layout.
Workspaces — Plans 3 types
Operations recorded but not yet run.
How a plan is grouped into tmux invocations.
Compiles the workspace README's examples, and nothing else.
Workspaces — Steps 10 types
An operation that may share one tmux invocation with its neighbours.
Turns a recorded step index into whatever Plan::add() returns for it.
One tmux invocation: the operations it carries, in order.
Why a Step is its own tmux invocation.
How an operation ended.
How much a run could tell about each operation's outcome.
The typed value one operation produced.
What one recorded operation produced, in plan order.
What one dispatched invocation produced.
Workspaces — Targets and slots 9 types
The tmux object an operation addresses or makes.
A typed reference to the object a recorded operation will create.
Marker for a slot that points at a session.
Marker for a slot that points at a window.
Marker for a slot that points at a pane.
A -t target naming a pane, resolved when the plan runs.
A -t target naming a window, resolved when the plan runs.
A -t target naming a session, resolved when the plan runs.
split-window's -t: a window (its active pane divides) or an exact pane. -t <window> always resolves to the active pane, which a detached split never changes, so a chain of splits needs the pane form (SplitWindow::from_pane()) after the first.
Workspaces — Session 1 type
Create a session.
Workspaces — Window 5 types
Split a window, making a pane.
Create a window in a session.
Make a window the active one.
Rename a window.
Destroy a window.
Workspaces — Pane 2 types
Make a pane the active one.
Destroy a pane.
Errors 12 types
Why a control-mode connection failed.
Which way tmux would not accept an option.
A coarse failure category for reporting and routing.
An invalid scope-specific tmux object ID.
An error returned by libtmux.
The kind of tmux object a failure refers to.
Payload-free metadata describing why tmux output could not be decoded.
A scoped resource's creation, operation, or cleanup failure.
An invalid dependency between two plan steps, or a step whose own arguments cannot render as one tmux command.
The ways an iterator can fail to contain exactly one item.
An error indicating that an iterator contained more than one item.
A source-less, value-free portable expression validation error.
Errors — Server 2 types
The category of an invalid crate::ServerBuilder configuration.
Which way a tmux server was not there.
Errors — Session 1 type
Why a session name is one tmux could not address.
Constants and enums 15 types
The exact status and output captured for one tmux command.
Something tmux reported that no command asked for.
The outcome of one command sent over control mode.
One control-mode connection to a tmux server.
Whether writing a hook keeps the entries it does not name.
What kind of value an option holds.
How far back a capture reaches, and in what form.
Why a plan dependency is invalid.
What running a plan produced.
The category of an invalid portable filter expression.
The fixed-width integer types understood by generated schema checks.
How much a user on the server's access list may do.
Which prompt tmux is remembering answers for.
Where a pane lands when it is moved into another window.
Options for splitting a window or pane into a new pane.
Constants and enums — Session 1 type
Options for creating a session.
Constants and enums — Window 1 type
Options for creating a window in a session.
Testing utilities 6 types, 5 functions and constants
The category of a TestServer lifecycle failure.
A source-less, redacted failure from TestServer.
A consuming builder for an isolated foreground tmux test server.
One isolated tmux daemon and its descriptor-relative cleanup guard.
Whether a fixture's tmux daemon is still running, and how it ended if not.
A condition did not hold before its deadline.
Write script to path as an executable, and return once it can run.
Kill tmux servers left behind by fixtures that never cleaned up.
Poll until a condition holds, or the deadline passes.
Widen a fixture deadline by LIBTMUX_TEST_TIMEOUT_SCALE.
Build a name no other caller in this process will produce.
Internal 5 functions and constants
Frame arbitrary control-mode output into replies, and check each reply.
Decode arbitrary listing output, then check that decoding inverts tmux.
Exercise layout validation for fuzzing; not a supported API.
Parse one control-mode protocol line, for fuzzing only.
Decode list-keys -F output, for fuzzing only.
Other 8 types
A runtime for calling this crate's async methods from ordinary code.
How many bytes one dispatch may read from each stream.
The design notes, compiled.
The findings catalogue, compiled for the same reason as DesignNotes.
Checks that a doctest runs inside the tmux sandbox.
Compiles the libtmux-macros README's examples, and nothing else.
Compiles the README's Rust blocks. The README is the command's page on crates.io, not this crate's documentation, so it renders nowhere here.
By module 54 modules
-
blocking 1
-
capabilities 1
-
client 1
-
command 4
-
freeze 1
-
hooks 3
-
pane 4
-
snapshot 4
-
control.fuzz 1
-
error.scoped 1
-
formats.fuzz 1
-
formats.text 1
-
mcp.caller 2
-
mcp.exec 4
-
mcp.manifest 1
-
mcp.model 20
-
mcp.resources 4
-
mcp.src 1
-
mcp.tail 1
-
options.generated 217
- ACTIVITY
_ACTION - AFTER
_BIND _KEY - AFTER
_CAPTURE _PANE - AFTER
_COPY _MODE - AFTER
_DISPLAY _MESSAGE - AFTER
_DISPLAY _PANES - AFTER
_KILL _PANE - AFTER
_LIST _BUFFERS - AFTER
_LIST _CLIENTS - AFTER
_LIST _KEYS - AFTER
_LIST _PANES - AFTER
_LIST _SESSIONS - AFTER
_LIST _WINDOWS - AFTER
_LOAD _BUFFER - AFTER
_LOCK _SERVER - AFTER
_NEW _SESSION - AFTER
_NEW _WINDOW - AFTER
_PASTE _BUFFER - AFTER
_PIPE _PANE - AFTER
_QUEUE - AFTER
_REFRESH _CLIENT - AFTER
_RENAME _SESSION - AFTER
_RENAME _WINDOW - AFTER
_RESIZE _PANE - AFTER
_RESIZE _WINDOW - AFTER
_SAVE _BUFFER - AFTER
_SELECT _LAYOUT - AFTER
_SELECT _PANE - AFTER
_SELECT _WINDOW - AFTER
_SEND _KEYS - AFTER
_SET _BUFFER - AFTER
_SET _ENVIRONMENT - AFTER
_SET _HOOK - AFTER
_SET _OPTION - AFTER
_SHOW _ENVIRONMENT - AFTER
_SHOW _MESSAGES - AFTER
_SHOW _OPTIONS - AFTER
_SPLIT _WINDOW - AFTER
_UNBIND _KEY - AGGRESSIVE
_RESIZE - ALERT
_ACTIVITY - ALERT
_BELL - ALERT
_SILENCE - ALLOW
_PASSTHROUGH - ALLOW
_RENAME - ALLOW
_SET _TITLE - ALTERNATE
_SCREEN - ASSUME
_PASTE _TIME - AUTOMATIC
_RENAME - AUTOMATIC
_RENAME _FORMAT - BACKSPACE
- BASE
_INDEX - BELL
_ACTION - BUFFER
_LIMIT - CLIENT
_ACTIVE - CLIENT
_ATTACHED - CLIENT
_DARK _THEME - CLIENT
_DETACHED - CLIENT
_FOCUS _IN - CLIENT
_FOCUS _OUT - CLIENT
_LIGHT _THEME - CLIENT
_RESIZED - CLIENT
_SESSION _CHANGED - CLOCK
_MODE _COLOUR - CLOCK
_MODE _STYLE - CODEPOINT
_WIDTHS - COMMAND
_ALIAS - COMMAND
_ERROR - COPY
_COMMAND - COPY
_MODE _CURRENT _LINE _NUMBER _STYLE - COPY
_MODE _CURRENT _MATCH _STYLE - COPY
_MODE _LINE _NUMBER _STYLE - COPY
_MODE _LINE _NUMBERS - COPY
_MODE _MARK _STYLE - COPY
_MODE _MATCH _STYLE - COPY
_MODE _POSITION _FORMAT - COPY
_MODE _POSITION _STYLE - COPY
_MODE _SELECTION _STYLE - CURSOR
_COLOUR - CURSOR
_STYLE - DEFAULT
_CLIENT _COMMAND - DEFAULT
_COMMAND - DEFAULT
_SHELL - DEFAULT
_SIZE - DEFAULT
_TERMINAL - DESTROY
_UNATTACHED - DETACH
_ON _DESTROY - DISPLAY
_PANES _ACTIVE _COLOUR - DISPLAY
_PANES _COLOUR - DISPLAY
_PANES _TIME - DISPLAY
_TIME - EDITOR
- ESCAPE
_TIME - EXIT
_EMPTY - EXIT
_UNATTACHED - EXTENDED
_KEYS - EXTENDED
_KEYS _FORMAT - FILL
_CHARACTER - FOCUS
_EVENTS - FOCUS
_FOLLOWS _MOUSE - GET
_CLIPBOARD - HISTORY
_FILE - HISTORY
_LIMIT - INITIAL
_REPEAT _TIME - INPUT
_BUFFER _SIZE - KEY
_TABLE - LOCK
_AFTER _TIME - LOCK
_COMMAND - MAIN
_PANE _HEIGHT - MAIN
_PANE _WIDTH - MENU
_BORDER _LINES - MENU
_BORDER _STYLE - MENU
_SELECTED _STYLE - MENU
_STYLE - MESSAGE
_COMMAND _STYLE - MESSAGE
_FORMAT - MESSAGE
_LIMIT - MESSAGE
_LINE - MESSAGE
_STYLE - MODE
_KEYS - MODE
_STYLE - MONITOR
_ACTIVITY - MONITOR
_BELL - MONITOR
_SILENCE - MOUSE
- OTHER
_PANE _HEIGHT - OTHER
_PANE _WIDTH - PANE
_ACTIVE _BORDER _STYLE - PANE
_BASE _INDEX - PANE
_BORDER _FORMAT - PANE
_BORDER _INDICATORS - PANE
_BORDER _LINES - PANE
_BORDER _STATUS - PANE
_BORDER _STYLE - PANE
_COLOURS - PANE
_DIED - PANE
_EXITED - PANE
_FOCUS _IN - PANE
_FOCUS _OUT - PANE
_MODE _CHANGED - PANE
_SCROLLBARS - PANE
_SCROLLBARS _POSITION - PANE
_SCROLLBARS _STYLE - PANE
_SET _CLIPBOARD - PANE
_STATUS _CURRENT _STYLE - PANE
_STATUS _STYLE - PANE
_TITLE _CHANGED - POPUP
_BORDER _LINES - POPUP
_BORDER _STYLE - POPUP
_STYLE - PREFIX
- PREFIX
_TIMEOUT - PREFIX2
- PROMPT
_COMMAND _CURSOR _STYLE - PROMPT
_CURSOR _COLOUR - PROMPT
_CURSOR _STYLE - PROMPT
_HISTORY _LIMIT - REMAIN
_ON _EXIT - REMAIN
_ON _EXIT _FORMAT - RENUMBER
_WINDOWS - REPEAT
_TIME - SCROLL
_ON _CLEAR - SESSION
_CLOSED - SESSION
_CREATED - SESSION
_RENAMED - SESSION
_STATUS _CURRENT _STYLE - SESSION
_STATUS _STYLE - SESSION
_WINDOW _CHANGED - SET
_CLIPBOARD - SET
_TITLES - SET
_TITLES _STRING - SILENCE
_ACTION - STATUS
- STATUS
_BG - STATUS
_FG - STATUS
_FORMAT - STATUS
_INTERVAL - STATUS
_JUSTIFY - STATUS
_KEYS - STATUS
_LEFT - STATUS
_LEFT _LENGTH - STATUS
_LEFT _STYLE - STATUS
_POSITION - STATUS
_RIGHT - STATUS
_RIGHT _LENGTH - STATUS
_RIGHT _STYLE - STATUS
_STYLE - SYNCHRONIZE
_PANES - TERMINAL
_FEATURES - TERMINAL
_OVERRIDES - TILED
_LAYOUT _MAX _COLUMNS - TREE
_MODE _PREVIEW _FORMAT - TREE
_MODE _PREVIEW _STYLE - UPDATE
_ENVIRONMENT - USER
_KEYS - VARIATION
_SELECTOR _ALWAYS _WIDE - VISUAL
_ACTIVITY - VISUAL
_BELL - VISUAL
_SILENCE - WINDOW
_ACTIVE _STYLE - WINDOW
_LINKED - WINDOW
_PANE _CURRENT _STATUS _FORMAT - WINDOW
_PANE _STATUS _FORMAT - WINDOW
_SIZE - WINDOW
_STATUS _ACTIVITY _STYLE - WINDOW
_STATUS _BELL _STYLE - WINDOW
_STATUS _CURRENT _FORMAT - WINDOW
_STATUS _CURRENT _STYLE - WINDOW
_STATUS _FORMAT - WINDOW
_STATUS _LAST _STYLE - WINDOW
_STATUS _SEPARATOR - WINDOW
_STATUS _STYLE - WINDOW
_STYLE - WINDOW
_UNLINKED - WORD
_SEPARATORS - WRAP
_SEARCH - XTERM
_KEYS
- ACTIVITY
-
plan.planner 3
-
query.fields 6
-
server.builder 1
-
server.discovery 4
-
server.interactive 1
-
server.keys 2
-
mcp.tools.contract 2
-
mcp.tools.error 1
-
plan.ops.options 2
-
plan.ops.panes 6
-
plan.ops.sessions 1
-
plan.ops.timing 1
-
plan.ops.windows 5