tmux-workspace 0.1.0-alpha.12 · Source
A Rust workspace describes a new session. Parsing reads the description; planning builds an inert sequence of operations; building executes it on a server.
ConfigurationLink to section
Workspace::from_yaml accepts tmuxp-style
session, window, and pane data. The configuration supports working directories,
commands, environment variables, options, focus, and layouts. Unknown keys are
listed in unsupported_keys and ignored.
That behavior differs from a strict parser: successful parsing does not prove
that every field in a larger tmuxp file was applied.
A pane’s working directory overrides its window’s directory, which overrides the workspace’s directory. The parser and builder own the supported shape; Python plugins are not loaded by the crate.
Preview and executionLink to section
WorkspaceBuilder::plan does not contact tmux. Its preview exposes the
commands and references to objects that later operations will create. This is
a construction plan, not a reconciliation of an existing session.
build checks the requested session name and returns
BuildError::SessionExists
when it is already present. A later tmux error can leave objects already
created. The builder does not roll back the session, so inspect the dedicated
server and decide whether to keep or remove that partial result.
Freeze a running sessionLink to section
freeze captures windows, panes, working directories, and focus into a
Workspace. to_yaml serializes that description, and from_yaml reads it
back. This recovers structure rather than a process checkpoint: tmux cannot
recover the original command line from the current foreground program alone.
Review exported commands before using the file as a launcher. Freezing does not preserve application memory, terminal history, or files on disk.