-
A tmux layout described as data, in tmuxp's vocabulary.
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.
Discussed in Swift workspace internals , Swift workspace builder behavior , Swift workspace builder API
In other ports Describe a workspace as data
- Python tmuxp uses configuration dictionaries rather than a dedicated workspace value type
- Ruby
LibTmux::Workspace - Lua No source-verified Lua equivalent is recorded for this operation.
- TypeScript
config.Workspace - Rust
config.Workspace - Go
workspace.Workspace - Java
io.github.libtmux.workspace.Workspace.Workspace - .NET
LibTmux.Workspace.WorkspaceFile - C++
libtmux::workspace::Workspace
Members
- functionstatic ¶!=(_:_:)
-
Inherited from
Equatable.!=(_:_:)Returns a Boolean value indicating whether two values are not equal.
Inequality is the inverse of equality. For any values
aandb,a != bimplies thata == bisfalse.This is the default implementation of the not-equal-to operator (
!=) for any type that conforms toEquatable.- Parameters:
- lhs: A value to compare.
- rhs: Another value to compare.
- Parameters:
- sessionName : let sessionName: String
-
What the session is called once built.
- startDirectory : let startDirectory: String?
-
Where every window starts unless it names its own. Left out, tmux uses whatever directory it was started from.
- windows : let windows: [WindowPlan]
-
The windows to build, in the order they are written.
init(sessionName:startDirectory:windows:)
- init(sessionName:startDirectory:windows:) ( sessionName : String , startDirectory : String? , windows : [WindowPlan] )
-
Reads a workspace from JSON.
- Raises
Discussed in Build a workspace from a file · Use the Swift workspace builder , Swift workspace builder API
-
Reads a workspace from YAML, which is how tmuxp files are usually written.
Available when the
YAMLWorkspacestrait is enabled, which is what pulls in the YAML parser:Examples
.package(url: "https://github.com/libtmux/libtmux-swift.git",exact: "0.1.0-alpha.5",traits: ["YAMLWorkspaces"])- Raises
Discussed in Build a workspace from a file · Use the Swift workspace builder , Swift workspace builder API
- method ¶init(from:)
-
Inherited from
Decodable.init(from:)Creates a new instance by decoding from the given decoder.
This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.
- Parameter decoder: The decoder to read data from.