# tmux.Window

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

Window is one materialized (session, index, window) winlink record. It is normally returned by [Server.Snapshot], [Server.Window], or [Window.Refresh]. A zero Window is not a usable tmux target.

## Members

- `DisplayMessage` (method) — DisplayMessage displays or prints a message at this window's exact target. Print returns an owned stdout slice even on a completed nonzero exit; completed stderr reaches [WarningHandler] as [WarningCommandStderr]. NoExpand follows [UnsupportedPolicy]. Warnings run synchronously before return; context cancellation does not prove display did not occur.
- `Formats` (method) — Formats returns this Window's read-only materialized tmux format values. It does not query tmux; use [Server.Snapshot] to obtain a fresh record.
- `Active` (method) — Active returns tmux #{window_active} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `ActiveClients` (method) — ActiveClients returns tmux #{window_active_clients} as int from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `ActiveClientsList` (method) — ActiveClientsList returns tmux #{window_active_clients_list} as string from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `ActiveSessions` (method) — ActiveSessions returns tmux #{window_active_sessions} as int from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `ActiveSessionsList` (method) — ActiveSessionsList returns tmux #{window_active_sessions_list} as string from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `Activity` (method) — Activity returns tmux #{window_activity} as time.Time from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `ActivityFlag` (method) — ActivityFlag returns tmux #{window_activity_flag} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `BellFlag` (method) — BellFlag returns tmux #{window_bell_flag} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `Bigger` (method) — Bigger returns tmux #{window_bigger} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `CellHeight` (method) — CellHeight returns tmux #{window_cell_height} as int from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `CellWidth` (method) — CellWidth returns tmux #{window_cell_width} as int from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `EndFlag` (method) — EndFlag returns tmux #{window_end_flag} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `Flags` (method) — Flags returns tmux #{window_flags} as string from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `Format` (method) — Format returns tmux #{window_format} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `Height` (method) — Height returns tmux #{window_height} as int from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `LastFlag` (method) — LastFlag returns tmux #{window_last_flag} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `Layout` (method) — Layout returns tmux #{window_layout} as string from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `Linked` (method) — Linked returns tmux #{window_linked} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `LinkedSessionCount` (method) — LinkedSessionCount returns tmux #{window_linked_sessions} as int from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `LinkedSessionsList` (method) — LinkedSessionsList returns tmux #{window_linked_sessions_list} as string from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `MarkedFlag` (method) — MarkedFlag returns tmux #{window_marked_flag} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `Name` (method) — Name returns tmux #{window_name} as string from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `OffsetX` (method) — OffsetX returns tmux #{window_offset_x} as int from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `OffsetY` (method) — OffsetY returns tmux #{window_offset_y} as int from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `PaneCount` (method) — PaneCount returns tmux #{window_panes} as int from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `RawFlags` (method) — RawFlags returns tmux #{window_raw_flags} as string from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `SilenceFlag` (method) — SilenceFlag returns tmux #{window_silence_flag} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `StackIndex` (method) — StackIndex returns tmux #{window_stack_index} as int from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `StartFlag` (method) — StartFlag returns tmux #{window_start_flag} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `VisibleLayout` (method) — VisibleLayout returns tmux #{window_visible_layout} as string from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `Width` (method) — Width returns tmux #{window_width} as int from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `ZoomedFlag` (method) — ZoomedFlag returns tmux #{window_zoomed_flag} as bool from this Window's materialized window-scoped fields (tmux 3.2a or later).
- `Hooks` (method) — Hooks returns a freshly decoded, caller-owned view of known hooks at this exact window target, including inherited values. The receiver's exact linked session context controls tmux format evaluation. A read failure is returned rather than answered with zero values.
- `RawHook` (method) — RawHook returns one exact window hook value at this exact window target. A successful string is caller-owned; the receiver's exact linked session context controls tmux format evaluation, and completed failures are returned.
- `SetHook` (method) — SetHook stores a window hook at this exact window target without refreshing models. Completed failures are secret-safe option errors; cancellation does not prove tmux did not accept the mutation.
- `AppendHook` (method) — AppendHook appends a window hook at this exact window target without refreshing models. Completed failures are secret-safe option errors; cancellation does not prove tmux did not accept the append.
- `UnsetHook` (method) — UnsetHook removes every matching window hook index at this exact window target without refreshing models. Completed failures are secret-safe option errors; cancellation does not prove the unset was accepted.
- `RunHook` (method) — RunHook asks tmux to run one window hook directly at this exact target. The receiver's exact linked session context controls tmux format evaluation; no racy preflight is issued. Completed failures are secret-safe option errors; cancellation does not prove execution did not occur.
- `SetHooks` (method) — SetHooks applies indexed window hook commands in ascending order at this handle's exact window target. With ClearExisting it confirms clearing first, stops at the first failure without rollback, and reports confirmed progress. Cancellation may follow accepted commands and cannot disprove their delivery.
- `Equal` (method) — Equal reports whether two window records carry the same stable window ID. It intentionally collapses linked-session views with different sessions or indexes; use SessionID, WindowID, and WindowIndex for exact view identity.
- `String` (method) — String returns the winlink identity and its materialized parent, when present.
- `Kill` (method) — Kill destroys the stable window selected by the receiver's WindowID, removes all of its winlinks, and destroys its panes. Affected sessions preserve their current selection unless this window was current, in which case they select another. A session left without windows is destroyed; [Session.Kill] describes how tmux handles its clients. The receiver is not refreshed. Only stderr makes a completed command a [CommandError]; nonzero exits without stderr are ignored.
- `KillOthers` (method) — KillOthers destroys every other stable window selected through the receiver's exact session and leaves the receiver as that session's current and only window. Links in other sessions are not selected merely because they share the receiver's [WindowID], but every selected stable window is removed from all sessions. Other affected sessions preserve their current selection unless a destroyed window was current, in which case they select another. A session left without windows is destroyed; [Session.Kill] describes how tmux handles its clients. The receiver is not refreshed. Only stderr makes a completed command a [CommandError]; nonzero exits without stderr are ignored.
- `Refresh` (method) — Refresh performs a canonical live lookup for the window's stable ID and returns a new record without mutating the receiver. It does not preserve a linked-session view; use [Window.ResolveSession] for exact relationships.
- `SessionID` (method) — SessionID returns the linked session containing this view.
- `ID` (method) — ID returns the underlying stable tmux window identity.
- `Index` (method) — Index returns this window's index in its linked session. It returns -1 for a partial Window whose exact winlink has not been materialized.
- `Server` (method) — Server returns the configured handle that produced the window.
- `Session` (method) — Session returns this view's parent record when it remains in the same snapshot. It never queries tmux.
- `Panes` (method) — Panes returns newly allocated shallow copies of panes for this exact winlink, and reports whether the receiver carries relations at all.
- `SetAggressiveResize` (method) — SetAggressiveResize stores the "aggressive-resize" window option as bool (tmux 3.2a or later). Read it with [WindowOptionValues.AggressiveResize] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetAllowPassthrough` (method) — SetAllowPassthrough stores the "allow-passthrough" window option as AllowPassthrough (tmux 3.3 or later). Read it with [WindowOptionValues.AllowPassthrough] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetAllowRename` (method) — SetAllowRename stores the "allow-rename" window option as bool (tmux 3.2a or later). Read it with [WindowOptionValues.AllowRename] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetAllowSetTitle` (method) — SetAllowSetTitle stores the "allow-set-title" window option as bool (tmux 3.5 or later). Read it with [WindowOptionValues.AllowSetTitle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetAlternateScreen` (method) — SetAlternateScreen stores the "alternate-screen" window option as bool (tmux 3.2a or later). Read it with [WindowOptionValues.AlternateScreen] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetAutomaticRename` (method) — SetAutomaticRename stores the "automatic-rename" window option as bool (tmux 3.2a or later). Read it with [WindowOptionValues.AutomaticRename] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetAutomaticRenameFormat` (method) — SetAutomaticRenameFormat stores the "automatic-rename-format" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.AutomaticRenameFormat] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetClockModeColour` (method) — SetClockModeColour stores the "clock-mode-colour" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.ClockModeColour] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetClockModeStyle` (method) — SetClockModeStyle stores the "clock-mode-style" window option as ClockModeStyle (tmux 3.2a or later). Read it with [WindowOptionValues.ClockModeStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetCopyModeCurrentLineNumberStyle` (method) — SetCopyModeCurrentLineNumberStyle stores the "copy-mode-current-line-number-style" window option as string (tmux 3.7 or later). Read it with [WindowOptionValues.CopyModeCurrentLineNumberStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetCopyModeCurrentMatchStyle` (method) — SetCopyModeCurrentMatchStyle stores the "copy-mode-current-match-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.CopyModeCurrentMatchStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetCopyModeLineNumberStyle` (method) — SetCopyModeLineNumberStyle stores the "copy-mode-line-number-style" window option as string (tmux 3.7 or later). Read it with [WindowOptionValues.CopyModeLineNumberStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetCopyModeLineNumbers` (method) — SetCopyModeLineNumbers stores the "copy-mode-line-numbers" window option as CopyModeLineNumbers (tmux 3.7 or later). Read it with [WindowOptionValues.CopyModeLineNumbers] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetCopyModeMarkStyle` (method) — SetCopyModeMarkStyle stores the "copy-mode-mark-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.CopyModeMarkStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetCopyModeMatchStyle` (method) — SetCopyModeMatchStyle stores the "copy-mode-match-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.CopyModeMatchStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetCopyModePositionFormat` (method) — SetCopyModePositionFormat stores the "copy-mode-position-format" window option as string (tmux 3.6 or later). Read it with [WindowOptionValues.CopyModePositionFormat] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetCopyModePositionStyle` (method) — SetCopyModePositionStyle stores the "copy-mode-position-style" window option as string (tmux 3.6 or later). Read it with [WindowOptionValues.CopyModePositionStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetCopyModeSelectionStyle` (method) — SetCopyModeSelectionStyle stores the "copy-mode-selection-style" window option as string (tmux 3.6 or later). Read it with [WindowOptionValues.CopyModeSelectionStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetCursorColour` (method) — SetCursorColour stores the "cursor-colour" window option as string (tmux 3.3 or later). Read it with [WindowOptionValues.CursorColour] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetCursorStyle` (method) — SetCursorStyle stores the "cursor-style" window option as CursorStyle (tmux 3.3 or later). Read it with [WindowOptionValues.CursorStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetFillCharacter` (method) — SetFillCharacter stores the "fill-character" window option as string (tmux 3.3 or later). Read it with [WindowOptionValues.FillCharacter] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetMainPaneHeight` (method) — SetMainPaneHeight stores the "main-pane-height" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.MainPaneHeight] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetMainPaneWidth` (method) — SetMainPaneWidth stores the "main-pane-width" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.MainPaneWidth] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetMenuBorderLines` (method) — SetMenuBorderLines stores the "menu-border-lines" window option as MenuBorderLines (tmux 3.4 or later). Read it with [WindowOptionValues.MenuBorderLines] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetMenuBorderStyle` (method) — SetMenuBorderStyle stores the "menu-border-style" window option as string (tmux 3.4 or later). Read it with [WindowOptionValues.MenuBorderStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetMenuSelectedStyle` (method) — SetMenuSelectedStyle stores the "menu-selected-style" window option as string (tmux 3.4 or later). Read it with [WindowOptionValues.MenuSelectedStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetMenuStyle` (method) — SetMenuStyle stores the "menu-style" window option as string (tmux 3.4 or later). Read it with [WindowOptionValues.MenuStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetModeKeys` (method) — SetModeKeys stores the "mode-keys" window option as ModeKeys (tmux 3.2a or later). Read it with [WindowOptionValues.ModeKeys] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetModeStyle` (method) — SetModeStyle stores the "mode-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.ModeStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetMonitorActivity` (method) — SetMonitorActivity stores the "monitor-activity" window option as bool (tmux 3.2a or later). Read it with [WindowOptionValues.MonitorActivity] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetMonitorBell` (method) — SetMonitorBell stores the "monitor-bell" window option as bool (tmux 3.2a or later). Read it with [WindowOptionValues.MonitorBell] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetMonitorSilence` (method) — SetMonitorSilence stores the "monitor-silence" window option as int64 (tmux 3.2a or later). Read it with [WindowOptionValues.MonitorSilence] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetOtherPaneHeight` (method) — SetOtherPaneHeight stores the "other-pane-height" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.OtherPaneHeight] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetOtherPaneWidth` (method) — SetOtherPaneWidth stores the "other-pane-width" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.OtherPaneWidth] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneActiveBorderStyle` (method) — SetPaneActiveBorderStyle stores the "pane-active-border-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.PaneActiveBorderStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneBaseIndex` (method) — SetPaneBaseIndex stores the "pane-base-index" window option as int64 (tmux 3.2a or later). Read it with [WindowOptionValues.PaneBaseIndex] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneBorderFormat` (method) — SetPaneBorderFormat stores the "pane-border-format" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.PaneBorderFormat] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneBorderIndicators` (method) — SetPaneBorderIndicators stores the "pane-border-indicators" window option as PaneBorderIndicators (tmux 3.3 or later). Read it with [WindowOptionValues.PaneBorderIndicators] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneBorderLines` (method) — SetPaneBorderLines stores the "pane-border-lines" window option as PaneBorderLines (tmux 3.2a or later). Read it with [WindowOptionValues.PaneBorderLines] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneBorderStatus` (method) — SetPaneBorderStatus stores the "pane-border-status" window option as PaneBorderStatus (tmux 3.2a or later). Read it with [WindowOptionValues.PaneBorderStatus] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneBorderStyle` (method) — SetPaneBorderStyle stores the "pane-border-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.PaneBorderStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneScrollbars` (method) — SetPaneScrollbars stores the "pane-scrollbars" window option as PaneScrollbars (tmux 3.6 or later). Read it with [WindowOptionValues.PaneScrollbars] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneScrollbarsPosition` (method) — SetPaneScrollbarsPosition stores the "pane-scrollbars-position" window option as PaneScrollbarsPosition (tmux 3.6 or later). Read it with [WindowOptionValues.PaneScrollbarsPosition] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneScrollbarsStyle` (method) — SetPaneScrollbarsStyle stores the "pane-scrollbars-style" window option as string (tmux 3.6 or later). Read it with [WindowOptionValues.PaneScrollbarsStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneStatusCurrentStyle` (method) — SetPaneStatusCurrentStyle stores the "pane-status-current-style" window option as string (tmux 3.6 or later). Read it with [WindowOptionValues.PaneStatusCurrentStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneStatusStyle` (method) — SetPaneStatusStyle stores the "pane-status-style" window option as string (tmux 3.6 or later). Read it with [WindowOptionValues.PaneStatusStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPopupBorderLines` (method) — SetPopupBorderLines stores the "popup-border-lines" window option as PopupBorderLines (tmux 3.3 or later). Read it with [WindowOptionValues.PopupBorderLines] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPopupBorderStyle` (method) — SetPopupBorderStyle stores the "popup-border-style" window option as string (tmux 3.3 or later). Read it with [WindowOptionValues.PopupBorderStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPopupStyle` (method) — SetPopupStyle stores the "popup-style" window option as string (tmux 3.3 or later). Read it with [WindowOptionValues.PopupStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetRemainOnExit` (method) — SetRemainOnExit stores the "remain-on-exit" window option as RemainOnExit (tmux 3.2a or later). Read it with [WindowOptionValues.RemainOnExit] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetRemainOnExitFormat` (method) — SetRemainOnExitFormat stores the "remain-on-exit-format" window option as string (tmux 3.3 or later). Read it with [WindowOptionValues.RemainOnExitFormat] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetScrollOnClear` (method) — SetScrollOnClear stores the "scroll-on-clear" window option as bool (tmux 3.3 or later). Read it with [WindowOptionValues.ScrollOnClear] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetSessionStatusCurrentStyle` (method) — SetSessionStatusCurrentStyle stores the "session-status-current-style" window option as string (tmux 3.6 or later). Read it with [WindowOptionValues.SessionStatusCurrentStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetSessionStatusStyle` (method) — SetSessionStatusStyle stores the "session-status-style" window option as string (tmux 3.6 or later). Read it with [WindowOptionValues.SessionStatusStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetSynchronizePanes` (method) — SetSynchronizePanes stores the "synchronize-panes" window option as bool (tmux 3.2a or later). Read it with [WindowOptionValues.SynchronizePanes] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetTiledLayoutMaxColumns` (method) — SetTiledLayoutMaxColumns stores the "tiled-layout-max-columns" window option as int64 (tmux 3.6 or later). Read it with [WindowOptionValues.TiledLayoutMaxColumns] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetTreeModePreviewFormat` (method) — SetTreeModePreviewFormat stores the "tree-mode-preview-format" window option as string (tmux 3.7 or later). Read it with [WindowOptionValues.TreeModePreviewFormat] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetTreeModePreviewStyle` (method) — SetTreeModePreviewStyle stores the "tree-mode-preview-style" window option as string (tmux 3.7 or later). Read it with [WindowOptionValues.TreeModePreviewStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowActiveStyle` (method) — SetWindowActiveStyle stores the "window-active-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.WindowActiveStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowPaneCurrentStatusFormat` (method) — SetWindowPaneCurrentStatusFormat stores the "window-pane-current-status-format" window option as string (tmux 3.7 or later). Read it with [WindowOptionValues.WindowPaneCurrentStatusFormat] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowPaneStatusFormat` (method) — SetWindowPaneStatusFormat stores the "window-pane-status-format" window option as string (tmux 3.7 or later). Read it with [WindowOptionValues.WindowPaneStatusFormat] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowSize` (method) — SetWindowSize stores the "window-size" window option as WindowSize (tmux 3.2a or later). Read it with [WindowOptionValues.WindowSize] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowStatusActivityStyle` (method) — SetWindowStatusActivityStyle stores the "window-status-activity-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.WindowStatusActivityStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowStatusBellStyle` (method) — SetWindowStatusBellStyle stores the "window-status-bell-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.WindowStatusBellStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowStatusCurrentFormat` (method) — SetWindowStatusCurrentFormat stores the "window-status-current-format" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.WindowStatusCurrentFormat] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowStatusCurrentStyle` (method) — SetWindowStatusCurrentStyle stores the "window-status-current-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.WindowStatusCurrentStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowStatusFormat` (method) — SetWindowStatusFormat stores the "window-status-format" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.WindowStatusFormat] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowStatusLastStyle` (method) — SetWindowStatusLastStyle stores the "window-status-last-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.WindowStatusLastStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowStatusSeparator` (method) — SetWindowStatusSeparator stores the "window-status-separator" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.WindowStatusSeparator] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowStatusStyle` (method) — SetWindowStatusStyle stores the "window-status-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.WindowStatusStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWindowStyle` (method) — SetWindowStyle stores the "window-style" window option as string (tmux 3.2a or later). Read it with [WindowOptionValues.WindowStyle] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetWrapSearch` (method) — SetWrapSearch stores the "wrap-search" window option as bool (tmux 3.2a or later). Read it with [WindowOptionValues.WrapSearch] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetXTermKeys` (method) — SetXTermKeys stores the "xterm-keys" window option as bool (tmux 3.2a or later). Read it with [WindowOptionValues.XTermKeys] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default.
- `SetPaneColours` (method) — SetPaneColours replaces the complete "pane-colours" window option array with SparseArray[string], preserving holes and empty values (tmux 3.3 or later). Read it with [WindowOptionValues.PaneColours] from [Window.Options]; [Window.UnsetOption] restores inheritance or the global default. Replacement is not atomic: the result reports confirmed writes, and failures stop without rollback. Serialize concurrent replacement of the same target and option.
- `SetOption` (method) — SetOption stores a window option at this exact window target without refreshing existing models. Completed failures are secret-safe option errors; cancellation does not prove tmux did not accept the mutation.
- `AppendOption` (method) — AppendOption appends to a window option at this exact window target without refreshing models. Completed failures are secret-safe option errors; cancellation does not prove the append was not accepted.
- `UnsetOption` (method) — UnsetOption unsets a window option at this exact window target, or its pane copies with UnsetPanes, without refreshing models. Cancellation does not prove the unset was not accepted.
- `Options` (method) — Options returns a freshly decoded, caller-owned view of known options at this exact window target, including inherited values. The receiver's exact linked session context controls tmux format evaluation. A read failure is returned rather than answered with zero values. Each returned accessor names the setter that writes it, so [WindowOptionValues.MainPaneWidth] pairs with [Window.SetMainPaneWidth].
- `RawOption` (method) — RawOption returns one exact window option value at this exact window target. A successful string is caller-owned; the receiver's exact linked session context controls tmux format evaluation, and a completed failure is returned.
- `NewPane` (method) — NewPane creates a floating pane in the receiver's exact winlink. Attach makes the new pane active in that session and winlink; it is not a global client-focus guarantee. The returned [Pane] is freshly materialized in the receiver SessionID and WindowID rather than by canonical ID-only refresh.
- `SplitPane` (method) — SplitPane creates a tiled pane in the receiver's exact winlink. Attach makes the new pane active in that session and winlink; it is not a global client-focus guarantee. The returned [Pane] is freshly materialized in the receiver SessionID and WindowID rather than by canonical ID-only refresh.
- `Ref` (method) — Ref returns a [Ref] addressing the receiver.
- `ActivePane` (method) — ActivePane returns the first active pane in this materialized winlink view. It never queries tmux; use [Window.ResolveActivePane] for live state.
- `LinkedSessions` (method) — LinkedSessions returns newly allocated shallow copies of materialized sessions containing this window, and reports whether the receiver carries relations at all. It never queries tmux.
- `ResolveSession` (method) — ResolveSession snapshots live tmux state and returns this exact winlink's parent session. It returns [SnapshotLookupError] cardinality errors.
- `ResolveActivePane` (method) — ResolveActivePane snapshots live tmux state and returns the first active pane in this exact winlink view. A missing active pane returns ok false.
- `Cmd` (method) — Cmd executes a tmux subcommand targeted to the window's stable ID.
- `SearchPanes` (method) — SearchPanes returns this window's pane views selected by tmux's live -f expression. A nil filter omits -f and a nonnil empty filter sends an explicit expression. Stable session and window identities limit the projection.
- `SelectLayout` (method) — SelectLayout applies one layout operation to the receiver's exact winlink. It changes pane geometry without selecting the window or promising client focus. The materialized receiver is not refreshed, so callers that need current pane geometry must obtain a new snapshot or refresh related models. A transport or context error can be delivery-ambiguous; the void result cannot carry partial state and no rollback is attempted.
- `NextLayout` (method) — NextLayout applies the next preset layout to the receiver's exact winlink. It changes pane geometry without selecting or refreshing the window. A transport or context error can be delivery-ambiguous; the void result cannot carry partial state and no rollback is attempted.
- `PreviousLayout` (method) — PreviousLayout applies the previous preset layout to the receiver's exact winlink. It changes pane geometry without selecting or refreshing the window. A transport or context error can be delivery-ambiguous; the void result cannot carry partial state and no rollback is attempted.
- `NewWindow` (method) — NewWindow creates a window relative to the receiver's exact winlink. Set Direction to [NewWindowDirectionAfter] or [NewWindowDirectionBefore] for non-destructive relative creation. With the zero Direction, tmux targets the receiver's occupied index and normally returns a command error; KillExisting can destroy and replace that target. Attach changes the current window only in that target session. Index is rejected before execution because the receiver already supplies the target position. SelectExisting has no no-output recovery on this exact-target form; tmux must print the created WindowID.
- `Rename` (method) — Rename changes the stable window through the receiver's exact winlink and returns a canonical freshly materialized [Window]. The returned winlink may therefore use another session when the WindowID is linked. If the command succeeds but refresh fails, Rename returns the receiver with that error. A transport or context error can be delivery-ambiguous; no rollback is attempted.
- `Select` (method) — Select makes the receiver's exact winlink current in its session. It does not promise focus for clients attached to other sessions. Select returns a canonical freshly materialized [Window], which may use another linked session for the same WindowID. If the command succeeds but refresh fails, it returns the receiver with that error. A transport or context error can be delivery-ambiguous; no rollback is attempted.
- `Link` (method) — Link adds the stable window to TargetSession as another winlink, targeting the source through the receiver's exact session. Unless Detach is set, tmux makes the new link current in the target session; this is not a global client-focus guarantee. Link does not refresh or mutate the materialized source [Window]. A transport or context error can be delivery-ambiguous; the void result cannot carry the new winlink identity and no rollback is attempted.
- `Unlink` (method) — Unlink removes the receiver's exact session winlink without refreshing the materialized receiver. Without KillIfLast, tmux rejects removal of a stable window's only link; with it, that window is destroyed. A transport or context error can be delivery-ambiguous; the void result cannot carry partial identity and no rollback is attempted.
- `Move` (method) — Move removes the receiver's exact winlink and places it in TargetSession, or renumbers the selected session when Renumber is set. Unless NoSelect is set, tmux makes the moved winlink current in the destination session; this is not a global client-focus guarantee. The stable WindowID does not by itself identify either linked view.
- `Swap` (method) — Swap exchanges the receiver and Target exact winlinks. Their stable WindowIDs move to the opposite session-and-index views; a WindowID alone does not identify either endpoint. Unless Detach is set, tmux may change the affected sessions' current-window selection; this is not a global client-focus guarantee.
- `SelectPane` (method) — SelectPane makes an exact or relative pane active in the receiver's exact winlink without selecting the window in its session. Target must belong to that same SessionID and WindowID; a PaneID alone does not identify a linked view. The returned [Pane] is the freshly materialized active pane in the receiver context, not a canonical ID-only view.
- `LastPane` (method) — LastPane targets the receiver's exact winlink. Its zero request makes the previously active pane active without selecting the window in its session. With an Input mode, tmux changes the previous pane's input state without selecting it; the returned [Pane] is still the freshly materialized active pane in the receiver context.
- `Rotate` (method) — Rotate rotates pane positions in the receiver's exact winlink without selecting the window or promising client focus. It returns a freshly materialized exact [Window] preserving the receiver SessionID, rather than a canonical ID-only view. If the command succeeds but refresh fails, Rotate returns the receiver with that error; earlier failures return zero.
- `Resize` (method) — Resize changes the stable window's size through the receiver's exact winlink. It does not select the window or promise any client focus. Resize returns a canonical freshly materialized [Window], which may use another linked session for the same WindowID. If the command succeeds but refresh fails, it returns the receiver with that error; other command failures return a zero Window. A transport or context error can be delivery-ambiguous and no rollback is attempted.
- `Respawn` (method) — Respawn restarts the stable window process through the receiver's exact winlink. It does not select the window or promise any client focus. Respawn returns a canonical freshly materialized [Window], which may use another linked session for the same WindowID. If the command succeeds but refresh fails, it returns the receiver with that error; earlier failures return zero. Completed stderr produces a redacted [CommandError]; nonzero exits without stderr are followed by refresh.
