Workspace ManagerconceptAPI reference

Choose documentation 3

latest

Current version

latest
English

Unreleased LibTmux has not been released. Its API may change during development. This site's structure and URLs may change too.

MoreLess about this notice

Concept example A working example of the core library. It can change without notice. What concept means

LibTmuxWorkspace.apply

Methods

Apply detached through public core operations under one monotonic deadline. Existing names fail by default. reuse=SessionRef(...) explicitly borrows that exact session after checking its generation and name. Only newly created panes receive commands. The plan's 1-based positions resolve to returned typed refs.

apply(server, plan; timeout=30.0, cancel=nothing, reuse=nothing,
rollback=:none, readiness=:posix_shell, script_env=ENV, on_event=nothing)

Default readiness sends a marker through a POSIX shell and awaits its atomic publication through an owned file monitor. No polling or delays occur. Cancellation removes the directory, so late producers cannot leave waiters. Custom launchers with input require explicit readiness=:none. A successful command step means input was delivered, not that its shell job finished or succeeded.

rollback=:created attempts uncancelled cleanup within five seconds: remove the new session, or only created window links in a borrowed session. It does not restore borrowed options/environment, global settings or shell effects. Failed/uncertain creations are never guessed at or deleted. Inspect WorkspaceApplyError.result. Events run synchronously and must return promptly; a callback error stops apply.

In other ports

task equivalence 13 other ports mapped

Source-verified mappings for Build a session from a workspace description. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.

Build a session from a workspace description in each port
PortAPIDiffers from Julia
Julia LibTmuxWorkspace.apply This page
Python tmuxp.workspace.builder.ClassicWorkspaceBuilder.build
Build tmux workspace in session.
None recorded in the model
Ruby LibTmux::Workspace::Plan#apply
Behavior: Workspace apply.
None recorded in the model
PowerShell LibTmux.Workspace\Invoke-TmuxWorkspace
Apply the exact workspace plan after one confirmation.
Applies the exact reviewed -Plan after PowerShell confirmation. -WhatIf previews without applying it; application is detached.
Common Lisp libtmux.workspace:apply-workspace
Apply WORKSPACE through explicit CLIENT and return a WORKSPACE-RESULT. Workspace/1 retains topology-only creation/reuse. Workspace/2 freshly acquires owned state and replans; a preview is never mutation authority. By default owned declaration changes or drift are refused; :RECONCILE permits only the qualified additive, rename, metadata and layout changes. It never adopts an unowned session or repeats an uncertain mutation. RECONCILE requires schema /2.
None recorded in the model
TypeScript builder.applyWorkspace
Build a workspace into a real tmux session, or reconcile one that exists.
async
Rust src.WorkspaceBuilder.build
Create the session a workspace describes, and return it.
async
Go workspace.Build
Build creates the workspace on server and returns the created session.
None recorded in the model
Java io.github.libtmux.workspace.WorkspaceBuilder.build
Creates the described session on a server.
None recorded in the model
C# LibTmux.Workspace.WorkspaceBuilder.BuildAsync
Plans and applies a workspace with the default policies.
async
C++ libtmux::workspace::build None recorded in the model
Swift WorkspaceBuilder.build(_:on:)
Creates the workspace's session and returns it.
async
OCaml Libtmux_unix.Workspace.await
Apply steps at most once per execution handle. Expected failures return retained receipts. On initial application, compensate_on_failure defaults to true, attempting removal of proven newly created panes after failure or cancellation. Passing false skips that compensation. Cancellation propagates after recording progress and at most 500 ms of protected compensation; use inspect afterward.
Apply a validated Plan through submit, then await its retained execution receipt. Inspect preserves partial and late outcomes.
Perl LibTmux::Workspace::load
load(server => $server, existing => 'error'|'skip') uses public LibTmux::Server operations. It checks all session-name conflicts before creation. error rejects any existing target with Conflict; skip leaves that entire session alone, so repeated application creates only absent sessions. A missing server permits explicit creation; other acquisition failures propagate.
Loads through installed public core APIs; existing-target policy and known owned rollback effects are explicit.
No Haskell equivalent.

No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.

No Raku equivalent.

Workspace functionality is outside the Raku core library scope.

No equivalent is recorded in Lua, Erlang, Elixir, Clojure, Kotlin, Scala or F#.

Esc
Search in

Type to search.

Reference previewOpen reference