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.

Swift API

API reference

Browse the Swift types and operations for working with tmux. Start with the core objects below, or search for a type or member.

Server 4 types
Server struct 108 members

A tmux server, addressed by its endpoint.

DiscoveredServer struct 6 members

A tmux server found listening on a socket.

ServerDiscovery struct 4 members

The bounded result of scanning for tmux servers.

ServerIncarnation struct 7 members

The identity of one running tmux daemon at one endpoint.

Session 2 types
Session struct 13 members

A tmux session, as it was when the listing was read.

SessionID struct 12 members

A tmux session id such as $1.

Window 6 types
Window struct 13 members

One tmux window, independent of every session that links it.

WindowPlacement enum 4 members

Where a new window goes relative to one that is already there.

WindowID struct 12 members

A tmux window id such as @1.

WindowLinkID struct 6 members

The session-local identity of one link to a window.

WindowLink struct 10 members

One session-local link to a window.

WindowAppearance struct 4 members

One window and one session-local appearance, read from the same tmux reply.

Pane 4 types
Pane struct 24 members

A tmux pane, as it was when the listing was read.

PaneDirection enum 6 members

Where a split puts the pane it creates.

PaneSize enum 4 members

How big a split makes the pane it creates.

PaneID struct 12 members

A tmux pane id such as %1.

Client 1 type
Client struct 18 members

A client attached to a tmux server.

Hooks 2 types
HookScope enum 4 members

Which of tmux's hook tables a hook lives in.

TmuxHook struct 7 members

One tmux hook: a command tmux runs when something happens.

Options 2 types
OptionScope enum 8 members

The exact tmux table that owns an option.

TmuxOption struct 7 members

One tmux option.

Buffers 1 type
TmuxBuffer struct 6 members

One of the server's paste buffers.

Layout and geometry 1 type
ResizeDirection enum 6 members

Which way a resize moves the boundary a pane shares with its neighbour.

Environment 2 types
EnvironmentScope enum 4 members

Which environment a variable lives in.

TmuxEnvironmentVariable struct 6 members

One variable in a tmux environment.

Versions 1 type
TmuxVersion struct 17 members

A tmux release, ordered the way tmux numbers them.

Commands 2 types
TmuxCommandList struct 7 members

Several tmux commands sent in one invocation.

TmuxCommand struct 4 members

One tmux command, as argv.

Control mode 4 types, 1 function or constant
ControlReply struct 5 members

One command's reply, framed between tmux's %begin and its terminator.

ControlNotification struct 4 members

Something tmux said without being asked.

ControlSession class 8 members

A live control-mode connection.

ControlNotificationStream struct 18 members

One observer's control notifications with finite pending storage.

A lazy view of subscription changes from one bounded notification observer.

Formats 1 type
FormatSubscription struct 6 members

A format tmux reports changes to, rather than being asked for.

Queries 6 types, 3 functions and constants
FilterValue enum 5 members

A value a filter can compare against.

Filterable interface 4 members

A model that can be filtered declaratively.

FilterOperation enum 10 members

How a filter compares one field.

FilterLookup enum 1 member

Builds a filter from a field__operator=value lookup written as text.

FilterSchema struct 10 members

The filtering vocabulary, as a document.

RelationQuery struct 5 members

A quantified filter over a relation, as one value.

The one element the filter matches.

filter(_:) method

Every element the filter matches, in order.

The one element the filter matches, or nil if none did.

Queries — Operators 2 types
FilterOperator struct 8 members

A typed operator. The Value it is built for is the projected type of the key path it is paired with, so pairing a text operator with an integer field is a compile error rather than a runtime surprise.

RelationQuantifier enum 9 members

How many related objects have to match.

Queries — Expressions 1 type
FilterExpr enum 9 members

A filter over one model, held as data.

Snapshots 4 types
CaptureCursor struct 3 members

Where a previous read of a pane stopped.

IncrementalCapture struct 8 members

What a pane has said since a cursor was taken.

PaneCapture struct 4 members

A bounded read of a pane.

Snapshot struct 26 members

Every object read from one daemon incarnation.

Errors 11 types, 1 function or constant
QueryConstructionError enum 4 members

Why a filter could not be built.

FilterValidationError enum 4 members

Why a decoded filter cannot be evaluated safely.

FilterSelectionError enum 4 members

Why selecting one result from a filter failed.

FilterLookupError enum 8 members

Why a filter keyword could not be turned into a comparison.

FilteredListingError enum 4 members

Why a filtered listing failed.

RegexCompileError enum 14 members

Why a RegexPattern could not be compiled.

RegexMatchError enum 5 members

Why a compiled RegexPattern could not finish matching.

TmuxError enum 20 members

Everything a tmux operation can fail with.

FormatDecodingError enum 5 members

A tmux reply that did not match its projection.

CardinalityError enum 4 members

Why a lookup that expected exactly one match did not get one.

OutputWaitError enum 4 members

Why waiting for pane output failed before it produced an outcome.

Narrowing a scope's thrown type back to TmuxError.

Constants and enums 1 type
TmuxMode enum 3 members

How work reaches tmux.

Testing utilities 3 types, 15 functions and constants
DescriptorDrain class 2 members

Reads a descriptor until it is told to stop, and proves it has stopped before the descriptor can be closed.

NamedSocketRootMissing struct 2 members

Thrown when a name-addressed case runs without a directory to put it in.

UnsafeReaperRoot struct 4 members

The reaper was asked to remove a path outside this port's owned roots.

Library-managed control mode needs a daemon of 3.7 or newer.

Exact named-buffer deletion and rename need 3.4.

The directory a socket name resolves inside, when the run provides one.

Whether this run can address servers by socket name inside the suite's root.

Whether the lane's tmux is at least major.minor plus a patch letter.

Whether the lane is exactly the release major.minor, with no patch letter.

A reaper that outlives this process, so a killed run leaves no server behind.

Runs executable and captures what it prints, without this library.

The lane binary when a matrix runner selected one, otherwise the first tmux on PATH, otherwise the first usual install location that exists. A bare name in the variable is searched for on PATH. Resolved to a path because the transport never searches PATH.

The release of the lane's tmux executable, read without a fork.

Waits until a pane's shell has drawn its first prompt.

Waits for a stopped daemon's Unix listener to close before reusing its path.

Polls condition until it holds, and reports whether it did.

Runs body against a private tmux server addressed by socket name, and always kills it.

Runs body against a private tmux server and always kills it — including when this process is killed outright.

Other 8 types
TmuxServers enum 2 members

Finding the tmux servers already running on this machine.

Endpoint enum 8 members

Where a tmux server listens.

A regular-expression feature this package deliberately does not execute.

RegexPattern struct 16 members

A compiled regular expression with bounded memory and matching work.

TmuxReply struct 8 members

What tmux said.

TmuxContext struct 9 members

Where the tmux this process is running inside can be found.

OutputWait struct 12 members

What a wait on a pane's output ended on.

SubscriptionChange struct 10 members

One report that a subscribed format's value changed.

Esc

Type to search.

Reference previewOpen reference