# workspace.Window

- **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#L49
- **Page:** https://libtmux.org/reference/go/workspace-window/

Window is one window in a workspace.

## Members

- `Name` (attribute) — Name is the window name. Empty lets tmux choose.
- `Index` (attribute) — Index requests an explicit winlink index. Nil uses the next free index.
- `Layout` (attribute) — Layout is a tmux layout name applied after the panes exist.
- `StartDirectory` (attribute) — StartDirectory overrides the workspace directory for this window.
- `Shell` (attribute) — Shell replaces the command the window's first pane runs.
- `Focus` (attribute) — Focus selects this window once the workspace is built.
- `SuppressHistory` (attribute) — SuppressHistory overrides the workspace setting for this window's panes.
- `Options` (attribute) — Options are applied after the window's initial pane exists and before additional panes are split.
- `OptionsAfter` (attribute) — OptionsAfter are window options applied once the panes exist, for settings that a later split would otherwise overwrite.
- `Environment` (attribute) — Environment is written to the session after this window's initial pane exists and before additional panes are split. Repeated names keep the last value written.
- `CommandsBefore` (attribute) — CommandsBefore run in each of this window's panes before the pane's own commands, after the workspace's.
- `Panes` (attribute) — Panes are created in order. The first pane is the window's initial pane; each later one splits the window.
- `UnmarshalYAML` (method) — UnmarshalYAML decodes the window, then its shell_command_before.
