Workspace ManagerconceptAPI 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.

Workspace Manager: API Reference

Edit this page on GitHub

Rust workspace builder API

tmux-workspace 0.1.2 · Source

The tmux_workspace crate exports its configuration types, builder, and freeze function. The core libtmux server and session remain the handles used for actual tmux operations.

Configuration

Workspace holds the session description. Workspace::from_yaml parses it, and to_yaml emits its YAML representation. WindowConfig and PaneConfig describe the nested objects; ConfigError identifies invalid configuration.

Builder

WorkspaceBuilder borrows a Server. new selects that server, plan returns the inert construction plan, and build asynchronously creates the requested session. Keep the server alive for the builder’s lifetime.

BuildError distinguishes configuration errors, underlying libtmux errors, refused operations, a missing initial window, and an existing session name. Successful completion returns a Session; failure does not imply rollback.

Export

freeze(&Session) asynchronously produces a Workspace describing the live session. Serialize that result with to_yaml. The exported structure is suitable for review and editing; it cannot restore process memory or recover an original shell command from a running program.

Public exports and builder; Freeze API.

API declarations

Follow a declaration for its signature, members, documentation, and source.

Workspace files

config.PaneConfig
One pane.
config.ShellCommand
One command typed into a pane, with tmuxp's per-command settings.
config.WindowConfig
One window and the panes it should contain.
config.Workspace
One workspace: a session and the windows it should contain.

Building and freezing

freeze.freeze
Describe a live session as a workspace.
src.WorkspaceBuilder
Creates tmux sessions from workspace configurations.

Errors

src.BuildError
A failure while building a workspace.
config.ConfigError
A workspace configuration failure.
Esc

Type to search.

Reference previewOpen reference