# tmux.GlobalSessionScope

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

GlobalSessionScope is an immutable handle for global session options and hooks. Its zero value is invalid because it contains a zero [Server].

## Members

- `Hooks` (method) — Hooks returns a freshly decoded, caller-owned view of known global session-scope hooks, including inherited values. A read failure is returned rather than answered with zero values.
- `RawHook` (method) — RawHook returns one exact global session-scope hook value. A successful string is caller-owned; ok reports presence. Targeted reads do not use list leniency, and completed failures return a secret-safe option error. An unindexed empty hook array is ambiguous; use Hooks for typed presence.
- `SetHook` (method) — SetHook stores a global session-scope hook 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 global session-scope hook 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 global session-scope hook index without refreshing models. Completed failures are secret-safe option errors; cancellation does not prove tmux did not accept the unset.
- `RunHook` (method) — RunHook asks tmux to run one global hook directly. It intentionally performs no racy target preflight; stale targets and global execution context remain tmux-defined. Completed failures are secret-safe option errors; cancellation does not prove hook delivery or execution did not occur.
- `SetHooks` (method) — SetHooks applies indexed global session-scope hook commands in ascending order. With ClearExisting it confirms clearing before applying sparse Values. It stops at the first failure without rollback; the returned result reports only confirmed partial progress and owns AppliedIndices. Cancellation may follow accepted commands and cannot disprove their delivery.
- `SetActivityAction` (method) — SetActivityAction stores the "activity-action" session option as ActivityAction (tmux 3.2a or later). Read it with [SessionOptionValues.ActivityAction] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetAssumePasteTime` (method) — SetAssumePasteTime stores the "assume-paste-time" session option as int64 (tmux 3.2a or later). Read it with [SessionOptionValues.AssumePasteTime] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetBaseIndex` (method) — SetBaseIndex stores the "base-index" session option as int64 (tmux 3.2a or later). Read it with [SessionOptionValues.BaseIndex] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetBellAction` (method) — SetBellAction stores the "bell-action" session option as BellAction (tmux 3.2a or later). Read it with [SessionOptionValues.BellAction] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetDefaultCommand` (method) — SetDefaultCommand stores the "default-command" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.DefaultCommand] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetDefaultShell` (method) — SetDefaultShell stores the "default-shell" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.DefaultShell] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetDefaultSize` (method) — SetDefaultSize stores the "default-size" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.DefaultSize] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetDestroyUnattached` (method) — SetDestroyUnattached stores the "destroy-unattached" session option as DestroyUnattached (tmux 3.2a or later). Read it with [SessionOptionValues.DestroyUnattached] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetDetachOnDestroy` (method) — SetDetachOnDestroy stores the "detach-on-destroy" session option as DetachOnDestroy (tmux 3.2a or later). Read it with [SessionOptionValues.DetachOnDestroy] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetDisplayPanesActiveColour` (method) — SetDisplayPanesActiveColour stores the "display-panes-active-colour" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.DisplayPanesActiveColour] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetDisplayPanesColour` (method) — SetDisplayPanesColour stores the "display-panes-colour" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.DisplayPanesColour] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetDisplayPanesTime` (method) — SetDisplayPanesTime stores the "display-panes-time" session option as int64 (tmux 3.2a or later). Read it with [SessionOptionValues.DisplayPanesTime] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetDisplayTime` (method) — SetDisplayTime stores the "display-time" session option as int64 (tmux 3.2a or later). Read it with [SessionOptionValues.DisplayTime] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetFocusFollowsMouse` (method) — SetFocusFollowsMouse stores the "focus-follows-mouse" session option as bool (tmux 3.7 or later). Read it with [SessionOptionValues.FocusFollowsMouse] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetHistoryLimit` (method) — SetHistoryLimit stores the "history-limit" session option as int64 (tmux 3.2a or later). Read it with [SessionOptionValues.HistoryLimit] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetInitialRepeatTime` (method) — SetInitialRepeatTime stores the "initial-repeat-time" session option as int64 (tmux 3.6 or later). Read it with [SessionOptionValues.InitialRepeatTime] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetKeyTable` (method) — SetKeyTable stores the "key-table" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.KeyTable] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetLockAfterTime` (method) — SetLockAfterTime stores the "lock-after-time" session option as int64 (tmux 3.2a or later). Read it with [SessionOptionValues.LockAfterTime] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetLockCommand` (method) — SetLockCommand stores the "lock-command" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.LockCommand] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetMessageCommandStyle` (method) — SetMessageCommandStyle stores the "message-command-style" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.MessageCommandStyle] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetMessageFormat` (method) — SetMessageFormat stores the "message-format" session option as string (tmux 3.7 or later). Read it with [SessionOptionValues.MessageFormat] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetMessageLine` (method) — SetMessageLine stores the "message-line" session option as MessageLine (tmux 3.4 or later). Read it with [SessionOptionValues.MessageLine] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetMessageStyle` (method) — SetMessageStyle stores the "message-style" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.MessageStyle] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetMouse` (method) — SetMouse stores the "mouse" session option as bool (tmux 3.2a or later). Read it with [SessionOptionValues.Mouse] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetPrefix` (method) — SetPrefix stores the "prefix" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.Prefix] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetPrefix2` (method) — SetPrefix2 stores the "prefix2" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.Prefix2] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetPromptCommandCursorStyle` (method) — SetPromptCommandCursorStyle stores the "prompt-command-cursor-style" session option as PromptCommandCursorStyle (tmux 3.7 or later). Read it with [SessionOptionValues.PromptCommandCursorStyle] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetPromptCursorColour` (method) — SetPromptCursorColour stores the "prompt-cursor-colour" session option as string (tmux 3.6 or later). Read it with [SessionOptionValues.PromptCursorColour] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetPromptCursorStyle` (method) — SetPromptCursorStyle stores the "prompt-cursor-style" session option as PromptCursorStyle (tmux 3.6 or later). Read it with [SessionOptionValues.PromptCursorStyle] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetRenumberWindows` (method) — SetRenumberWindows stores the "renumber-windows" session option as bool (tmux 3.2a or later). Read it with [SessionOptionValues.RenumberWindows] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetRepeatTime` (method) — SetRepeatTime stores the "repeat-time" session option as int64 (tmux 3.2a or later). Read it with [SessionOptionValues.RepeatTime] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetTitles` (method) — SetTitles stores the "set-titles" session option as bool (tmux 3.2a or later). Read it with [SessionOptionValues.SetTitles] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetTitlesString` (method) — SetTitlesString stores the "set-titles-string" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.SetTitlesString] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetSilenceAction` (method) — SetSilenceAction stores the "silence-action" session option as SilenceAction (tmux 3.2a or later). Read it with [SessionOptionValues.SilenceAction] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatus` (method) — SetStatus stores the "status" session option as Status (tmux 3.2a or later). Read it with [SessionOptionValues.Status] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusBG` (method) — SetStatusBG stores the "status-bg" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.StatusBG] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusFG` (method) — SetStatusFG stores the "status-fg" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.StatusFG] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusInterval` (method) — SetStatusInterval stores the "status-interval" session option as int64 (tmux 3.2a or later). Read it with [SessionOptionValues.StatusInterval] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusJustify` (method) — SetStatusJustify stores the "status-justify" session option as StatusJustify (tmux 3.2a or later). Read it with [SessionOptionValues.StatusJustify] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusKeys` (method) — SetStatusKeys stores the "status-keys" session option as StatusKeys (tmux 3.2a or later). Read it with [SessionOptionValues.StatusKeys] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusLeft` (method) — SetStatusLeft stores the "status-left" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.StatusLeft] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusLeftLength` (method) — SetStatusLeftLength stores the "status-left-length" session option as int64 (tmux 3.2a or later). Read it with [SessionOptionValues.StatusLeftLength] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusLeftStyle` (method) — SetStatusLeftStyle stores the "status-left-style" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.StatusLeftStyle] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusPosition` (method) — SetStatusPosition stores the "status-position" session option as StatusPosition (tmux 3.2a or later). Read it with [SessionOptionValues.StatusPosition] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusRight` (method) — SetStatusRight stores the "status-right" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.StatusRight] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusRightLength` (method) — SetStatusRightLength stores the "status-right-length" session option as int64 (tmux 3.2a or later). Read it with [SessionOptionValues.StatusRightLength] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusRightStyle` (method) — SetStatusRightStyle stores the "status-right-style" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.StatusRightStyle] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusStyle` (method) — SetStatusStyle stores the "status-style" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.StatusStyle] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetVisualActivity` (method) — SetVisualActivity stores the "visual-activity" session option as VisualActivity (tmux 3.2a or later). Read it with [SessionOptionValues.VisualActivity] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetVisualBell` (method) — SetVisualBell stores the "visual-bell" session option as VisualBell (tmux 3.2a or later). Read it with [SessionOptionValues.VisualBell] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetVisualSilence` (method) — SetVisualSilence stores the "visual-silence" session option as VisualSilence (tmux 3.2a or later). Read it with [SessionOptionValues.VisualSilence] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetWordSeparators` (method) — SetWordSeparators stores the "word-separators" session option as string (tmux 3.2a or later). Read it with [SessionOptionValues.WordSeparators] from [GlobalSessionScope.Options]; [GlobalSessionScope.UnsetOption] restores inheritance or the global default.
- `SetStatusFormat` (method) — SetStatusFormat replaces the complete "status-format" session option array with SparseArray[string], preserving holes and empty values (tmux 3.2a or later). Read it with [SessionOptionValues.StatusFormat] from [GlobalSessionScope.Options]; [GlobalSessionScope.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.
- `SetUpdateEnvironment` (method) — SetUpdateEnvironment replaces the complete "update-environment" session option array with SparseArray[string], preserving holes and empty values (tmux 3.2a or later). Read it with [SessionOptionValues.UpdateEnvironment] from [GlobalSessionScope.Options]; [GlobalSessionScope.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 global session option 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 global session option without refreshing models. Completed failures are secret-safe option errors; cancellation does not prove the append was not accepted.
- `UnsetOption` (method) — UnsetOption unsets a global session option without refreshing models. UnsetPanes is invalid at this scope; cancellation does not prove the unset was not accepted.
- `Options` (method) — Options returns a freshly decoded, caller-owned view of known global session options, including defaults. A read failure is returned rather than answered with zero values; context errors propagate. Each returned accessor names the setter that writes it, so [SessionOptionValues.Status] pairs with [GlobalSessionScope.SetStatus].
- `RawOption` (method) — RawOption returns one exact global session-option value. A successful string is caller-owned, and ok reports presence. An unindexed empty array is indistinguishable from an empty scalar; use Options for typed array presence.
