gui-startup
Since: 20220624-141144-bd1b7c5d Emitted once when the GUI server starts up (when runningwezterm start).
Timing
- Fires before any default program is started
- Fires before
gui-attachedevent - Does NOT fire for
wezterm connectinvocations - If this event creates panes, they take precedence over default program configuration
Event Signature
SpawnCommand | nil
Optional spawn command from
wezterm start arguments. Added in version 20220807-113146-c2fee766.Return Value
No return value expected. This is a fire-and-forget event.Examples
Split Window into Thirds
Maximize on Startup
Multiple Workspaces
Use Cases
- Setting up development environments with specific layouts
- Creating workspace-based configurations
- Maximizing or positioning windows on startup
- Auto-starting specific commands or shells
gui-attached
Since: 20230320-124340-559cb7b0 Emitted when the GUI attaches to a domain after startup.Timing
- Fires AFTER
gui-startupevent - Fires when using
wezterm connect DOMAINorwezterm start --domain DOMAIN - If no domain is specified, the default domain is passed
gui-startupdoes NOT fire when usingwezterm connect DOMAINorwezterm start --domain DOMAIN --attach
Event Signature
MuxDomain
The multiplexer domain that was attached. Provides information about the domain type and configuration.
Return Value
No return value expected.Examples
Maximize All Windows on Attach
Domain-Specific Setup
Log Domain Information
Use Cases
- Maximizing windows when connecting to remote domains
- Setting domain-specific visual themes or configurations
- Logging connection information
- Adjusting workspace layouts based on domain type
Comparison: gui-startup vs gui-attached
Common Patterns
Project-Specific Layouts
Conditional Window Positioning
Related Events
- mux-startup - Fires when multiplexer starts (before GUI events)
- window-config-reloaded - Fires when configuration is reloaded
See Also
- MuxWindow object - Multiplexer window API
- MuxTab object - Multiplexer tab API