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.

MoreLess about this notice

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

LibTmux.Workspace.WorkspaceFile

class LibTmux.Workspace.WorkspaceFile

Describes the supported subset of one tmuxp workspace.

Description

Parsing rejects keys that require tmuxp's Python hooks or plugins. It does not execute or silently discard configuration outside this model.

Guides

task material

Pages that discuss WorkspaceFile.

In other ports

task equivalence 9 other ports mapped

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

Describe a workspace as data in each port
PortAPIDiffers from C#
C# LibTmux.Workspace.WorkspaceFile
Describes the supported subset of one tmuxp workspace.
This page
Ruby LibTmux::Workspace None recorded in the model
TypeScript config.Workspace
A validated workspace with every schema default and transform applied.
None recorded in the model
Rust config.Workspace
One workspace: a session and the windows it should contain.
None recorded in the model
Go workspace.Workspace
Workspace is one tmuxp-style session description.
None recorded in the model
Java io.github.libtmux.workspace.Workspace
A session described in a file, before anything has been built.
None recorded in the model
C++ libtmux::workspace::Workspace None recorded in the model
Swift Workspace
A tmux layout described as data, in tmuxp's vocabulary.
None recorded in the model
OCaml Libtmux_workspace.Config.t None recorded in the model
Perl LibTmux::Workspace::new
new(config => $hashref) validates and copies a libtmux.workspace/v1 configuration. No I/O occurs. Sessions contain named windows with nonempty pane arrays. Each pane requires literal command arguments or an explicit shell_command. Environment values inherit from workspace, session, and window, with pane values taking precedence. All configuration errors throw Config.
Validates and copies a libtmux.workspace/v1 JSON-compatible configuration.
No Python equivalent.

tmuxp uses configuration dictionaries rather than a dedicated workspace value type

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, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Properties10

WorkspaceFile properties
NameTypeDescription
Environment IReadOnlyDictionary<string, string> Gets the environment entries contributed by this declaration.
ShellCommandsBefore IReadOnlyList<string> Gets the commands prepended at this declaration level.
BeforeCommands IReadOnlyList<WorkspaceCommand> Gets the typed commands prepended at this declaration level.
SessionName string? Gets the session name.
StartDirectory string? Gets the directory its windows start in.
Options IReadOnlyDictionary<string, string> Gets the session options to set.
GlobalOptions IReadOnlyDictionary<string, string> Gets the global session options to set before creating the declared windows.
Windows IReadOnlyList<WorkspaceWindow> Gets the windows to create, in order.
BeforeScript string? Gets the host command retained without expansion or execution by parsing or resolution.
DocumentDirectory string? Gets the absolute document directory supplied to resolution, or null before resolution.

Other members5 members

Common operations2

  • Resolve Resolves inherited pane directories against an explicit document base.
  • Parse Reads a workspace from tmuxp YAML or JSON.

Other members3

  • WorkspaceFile Initializes a workspace description.
  • WithDefaults Returns a declaration with replacement environment and pre-command defaults.
  • FromSnapshot Creates a workspace declaration from a captured session without reaching tmux.
Esc
Search in

Type to search.

Reference previewOpen reference