2022-06-18 02:57:52 +03:00
|
|
|
# `mux-startup`
|
|
|
|
|
2022-06-25 00:58:18 +03:00
|
|
|
*Since: 20220624-141144-bd1b7c5d*
|
2022-06-18 02:57:52 +03:00
|
|
|
|
|
|
|
The `mux-startup` event is emitted once when the mux server is starting up.
|
|
|
|
It is triggered before any default program is started.
|
|
|
|
|
|
|
|
If the `mux-startup` event causes any panes to be created then those will
|
|
|
|
take precedence over the default program configuration and no additional
|
|
|
|
default program will be spawned.
|
|
|
|
|
|
|
|
This event is useful for starting a set of programs in a standard
|
|
|
|
configuration to save you the effort of doing it manually each time:
|
|
|
|
|
|
|
|
```lua
|
|
|
|
local wezterm = require 'wezterm'
|
|
|
|
local mux = wezterm.mux
|
|
|
|
|
|
|
|
-- this is called by the mux server when it starts up.
|
|
|
|
-- It makes a window split top/bottom
|
2022-07-19 17:54:31 +03:00
|
|
|
wezterm.on('mux-startup', function()
|
|
|
|
local tab, pane, window = mux.spawn_window {}
|
|
|
|
pane:split { direction = 'Top' }
|
2022-06-18 02:57:52 +03:00
|
|
|
end)
|
|
|
|
|
|
|
|
return {
|
|
|
|
unix_domains = {
|
2022-07-19 17:54:31 +03:00
|
|
|
{ name = 'unix' },
|
2022-06-18 02:57:52 +03:00
|
|
|
},
|
|
|
|
}
|
|
|
|
```
|
2022-06-18 16:34:50 +03:00
|
|
|
|
|
|
|
See also:
|
|
|
|
* [wezterm.mux](../wezterm.mux/index.md)
|