1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-26 14:54:16 +03:00
wezterm/wezterm-gui
Wez Furlong 699bbce8e2 add gui-startup and mux-startup events
Using the newly exposed-to-lua mux apis, you may now run some lua code
at GUI startup and/or mux startup, just prior to any default windows
being created.

If you happen to spawn any panes as a result of this, wezterm will
skip creating the default program.

```lua
local wezterm = require 'wezterm'
local mux = wezterm.mux

-- This produces a window split horizontally into three equal parts
wezterm.on("gui-startup", function()
  wezterm.log_info("doing gui startup")
  local tab, pane, window = mux.spawn_window{}
  mux.split_pane(pane, {size=0.3})
  mux.split_pane(pane, {size=0.5})
end)

wezterm.on("mux-startup", function()
  wezterm.log_info("doing mux startup")
  local tab, pane, window = mux.spawn_window{}
  mux.split_pane(pane, {size=0.5, direction="Top"})
end)

return {
  unix_domains = {
    {name="unix"}
  },
}
```

refs: #674
refs: #1949
2022-06-17 12:37:19 -07:00
..
src add gui-startup and mux-startup events 2022-06-17 12:37:19 -07:00
build.rs Improve RESIZE window_decoration on Windows 2022-03-26 07:27:54 -07:00
Cargo.toml add wezterm.mux lua module 2022-06-17 07:46:25 -07:00