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

struct Workspace : struct Workspace

A tmux layout described as data, in tmuxp's vocabulary.

Description#

The modelled keys use tmuxp's spelling, so files limited to this structural subset need no translation. tmuxp's plugins, hooks, and environment runtime are ignored.

This is a narrower language than the tmux-workspace executable reads, and the two are separate readers of one file format. A tmuxp file handed to decode(json:) or decode(yaml:) loses shell_command_before, suppress_history, options, global_options, window_options, options_after, before_script and workspace_builder_options, and leaves $VAR unexpanded; the executable reads all of them. Diff the two before assuming a file means the same thing to both.

Guides#

Pages that discuss Workspace.

In other ports#

Describe a workspace as data

Equivalents of Describe a workspace as data in other languages
Language Equivalent
Python tmuxp uses configuration dictionaries rather than a dedicated workspace value type
Ruby LibTmux::Workspace
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript config.Workspace
Rust config.Workspace
Go workspace.Workspace
Java io.github.libtmux.workspace.Workspace
C# LibTmux.Workspace.WorkspaceFile
C++ libtmux::workspace::Workspace
OCaml Libtmux_workspace.Config.t
Perl LibTmux::Workspace::new Validates and copies a libtmux.workspace/v1 JSON-compatible configuration.

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

Members8#

Collections and queries1#

Common operations2#

  • decode(json:) method Reads a workspace from JSON.
  • decode(yaml:) method Reads a workspace from YAML, which is how tmuxp files are usually written.

Other members5#

Esc

Type to search.

Reference previewOpen reference