Skip to main content

Crate tmux_client

Crate tmux_client 

Source
Expand description

A typed, asynchronous client for tmux.

tmux-client invokes the tmux command-line protocol directly. It does not start a runtime, invoke a shell, or make dropping an object destructive.

use tmux_client::{NewSession, Server};

let server = Server::new();
let session = server
    .new_session(NewSession::new().name("example")?.detached(true))
    .await?;
assert_eq!(session.name().map(|name| name.as_str()), Some("example"));

Modules§

query
Typed, in-memory query expressions and iterator extensions.
test_support
Rust-native utilities for isolated, real-tmux integration tests.

Structs§

AttachedClient
A running, interactive attach-session child process.
Buffer
An owned snapshot of a tmux paste buffer.
BufferName
A validated tmux paste-buffer name.
CapturePane
Typed arguments for byte-preserving pane capture.
ChooseTree
Typed arguments for choose-tree.
Client
A tmux client discovered with list-clients.
ClientName
The server-visible name of an attached tmux client.
ClientSnapshot
An owned tmux ClientSnapshot field snapshot.
Command
A tmux subcommand and its arguments.
CommandPrompt
Typed arguments for command-prompt.
CommandResult
The raw result of a completed tmux command.
CommandSummary
A redacted, human-readable command description.
ConfirmBefore
Typed arguments for confirm-before.
CopyMode
Typed arguments for copy-mode.
DisplayMessage
Typed arguments for the broad display-message flag family.
FindWindow
Typed arguments for find-window.
FormatDescriptor
Metadata for one tmux format variable.
IfShell
Typed arguments for conditional tmux command execution.
KeyBinding
Typed arguments for bind-key.
Menu
Typed arguments for display-menu.
NativeFilter
A raw tmux native filter expression passed through via -f.
NewPane
Typed arguments for a tmux 3.7+ floating new-pane.
NewSession
Typed arguments for creating a session.
NewWindow
Typed arguments for creating a window.
OptionMap
A deterministic map of tmux option names to values.
Pane
A tmux pane handle with its parent identities and owned snapshot.
PaneId
A validated tmux pane identity.
PaneSnapshot
An owned tmux PaneSnapshot field snapshot.
PasteBuffer
Typed arguments for paste-buffer.
PipePane
Typed arguments for pipe-pane.
Popup
Typed arguments for display-popup.
ReleaseVersion
A released tmux version, including letter suffixes such as 3.2a.
RelocatePane
Typed placement arguments shared by move-pane and join-pane.
RespawnPane
Typed arguments for respawn-pane.
RespawnWindow
Typed arguments for respawn-window.
RunShell
Typed arguments for run-shell.
SelectPane
Typed arguments for select-pane.
SendKeys
Typed arguments for send-keys.
Server
A cheap handle to one tmux server configuration.
ServerBuilder
Builder for Server.
ServerConfig
Immutable process and socket configuration shared by all object handles.
Session
A tmux session handle with an owned snapshot.
SessionId
A validated tmux session identity.
SessionName
A validated tmux session name.
SessionSnapshot
An owned tmux SessionSnapshot field snapshot.
SparseOptionMap
Sparse indexed option values such as hooks and command-alias[].
SplitPane
Typed arguments for split-window.
SwapPane
Typed arguments for swap-pane.
TmuxText
Text returned by tmux without an implicit UTF-8 conversion.
UnbindKey
Typed arguments for unbind-key.
Window
A tmux window identity plus one session-specific link and owned snapshot.
WindowId
A validated tmux window identity.
WindowLink
A session-specific link to a window.
WindowResize
Typed arguments for the three resize-window modes.
WindowSnapshot
An owned tmux WindowSnapshot field snapshot.

Enums§

CaptureLine
A numbered capture line or tmux’s - history/screen boundary.
ClientPermission
A server ACL permission.
ColorMode
A tmux client color mode supplied on each command.
DecodedType
The intended decoded representation of a format token.
Error
A non-exhaustive error produced by configuration, execution, or parsing.
FormatScope
The tmux context needed to resolve a format token.
FormatToken
A known catalog token or an explicitly requested custom tmux token.
FormatValue
A value decoded according to a FormatDescriptor.
HookScope
Scope for hook commands.
Layout
A built-in tmux window layout or a caller-provided layout string.
MenuItem
One entry in a popup menu.
ObjectKind
The kind of tmux object involved in an error.
OptionErrorKind
A category of option parsing or mutation failure.
OptionScope
The scope used by tmux option commands.
OptionValue
A value accepted by tmux’s option and environment commands.
PaneDestination
A pane or window that can receive a moved or joined pane.
PaneSize
Initial pane size.
PaneTarget
A target that identifies a pane.
PromptType
A tmux prompt-history and completion namespace.
ResizeDirection
Direction for relative pane resizing.
Rotation
Direction used by rotate-window.
ServerAccess
A typed server-access action.
SessionTarget
A target that identifies a session.
Socket
The tmux socket identity used by a server handle.
SplitDirection
Orientation for a new pane.
SwapPaneDirection
Relative direction for swap-pane.
TmuxVersion
A tmux version reported by tmux -V.
TreeSort
Sort field used by the tree chooser.
WaitAction
An operation supported by wait-for.
WindowPosition
Placement relative to a target window.
WindowTarget
A target that identifies a window or a window link.

Traits§

SnapshotFields
Catalog-driven field access shared by every snapshot type.

Functions§

format_catalog
Returns the single catalog used for queries and snapshot accessors.
format_descriptor
Looks up a known descriptor by exact token name.

Type Aliases§

Result
A result returned by tmux-client.