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-workspaceexecutable reads, and the two are separate readers of one file format. A tmuxp file handed todecode(json:)ordecode(yaml:)losesshell_command_before,suppress_history,options,global_options,window_options,options_after,before_scriptandworkspace_builder_options, and leaves$VARunexpanded; 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
| Language | Equivalent |
|---|---|
| Python | tmuxp uses configuration dictionaries rather than a dedicated workspace value type |
| Ruby | Lib |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | config |
| Rust | config |
| Go | workspace |
| Java | io |
| C# | Lib |
| C++ | libtmux:: |
| OCaml | Libtmux |
| Perl | Lib 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#
- windows: let windows: [Window
Plan ] property The windows to build, in the order they are written.
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#
- !=(_:_:) function inherited Returns a Boolean value indicating whether two values are not equal.
- sessionName: let session
Name : String property What the session is called once built. - startDirectory: let start
Directory : String? property Where every window starts unless it names its own. Left out, tmux uses whatever directory it was started from. - init(sessionName:startDirectory:windows:) method
- init(from:) method inherited Creates a new instance by decoding from the given decoder.