# workspace.Workspace

- **Module:** workspace
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/workspace/workspace.go#L23
- **Page:** https://libtmux.org/reference/go/workspace-workspace/

Workspace is one tmuxp-style session description.

## Members

- `InitialSessionRequest` (method) — InitialSessionRequest validates w and returns the request that creates its session and initial window. Use the resulting materialized session with [BuildInto] to continue the build over a caller-owned transport.
- `SessionName` (attribute) — SessionName names the created session. It is required.
- `StartDirectory` (attribute) — StartDirectory is the default working directory for every window and pane that does not set its own.
- `Environment` (attribute) — Environment is written to the session after its initial pane exists and before later windows are created.
- `Options` (attribute) — Options are applied after session creation. tmux resolves window-option names against the session's current window.
- `GlobalOptions` (attribute) — GlobalOptions are applied after the initial window exists and before later windows are created.
- `CommandsBefore` (attribute) — CommandsBefore run in every pane before that pane's own commands. Window and pane entries add to this list rather than replacing it.
- `SuppressHistory` (attribute) — SuppressHistory prefixes commands with a space unless a window or pane overrides it.
- `Windows` (attribute) — Windows are created in order. A workspace needs at least one.
- `UnmarshalYAML` (method) — UnmarshalYAML decodes the workspace, then its shell_command_before, which accepts one command or a list.
- `Validate` (method) — Validate reports all problems joined under [ErrInvalidWorkspace].
- `MissingDirectories` (method) — MissingDirectories returns absent start directories in document order. It is separate from [Workspace.Validate] because a prior command may create them. tmux otherwise falls back to the user's home directory without an error. Names beginning with ~ are resolved as tmux resolves them.
