1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 13:52:55 +03:00

docs: window:maximize(), window:restore() and gui-startup

This commit is contained in:
Wez Furlong 2022-07-07 06:31:59 -07:00
parent 2c093b976d
commit 6485fae873
4 changed files with 30 additions and 0 deletions

View File

@ -16,6 +16,7 @@ As features stabilize some brief notes about them will accumulate here.
* [window:copy_to_clipboard](config/lua/window/copy_to_clipboard.md) method for putting arbitrary text into the clipboard/selection.
* [window:set_inner_size](config/lua/window/set_inner_size.md) method for controlling window size.
* [window:set_position](config/lua/window/set_position.md) method for controlling window position.
* [window:maximize](config/lua/window/maximize.md) and [window:restore](config/lua/window/restore.md) methods for controlling window maximization state.
* [window:get_selection_escapes_for_pane](config/lua/window/get_selection_escapes_for_pane.md) method for getting the current selection including escape sequences. [#2223](https://github.com/wez/wezterm/issues/2223)
* New [wezterm.gui](config/lua/wezterm.gui/index.md) module and [mux_window:gui_window](config/lua/mux-window/gui_window.md) method.

View File

@ -34,6 +34,20 @@ end)
return {}
```
This example creates a default window but makes it maximize on startup:
```lua
local wezterm = require 'wezterm'
local mux = wezterm.mux
wezterm.on("gui-startup", function()
local tab, pane, window = mux.spawn_window{}
window:gui_window():maximize()
end)
return {}
```
Here's a more elaborate example that configures two workspaces:
```lua

View File

@ -0,0 +1,7 @@
# `window:maximize()`
*Since: nightly builds only*
Puts the window into the maximized state.
Use [window:restore()](restore.md) to return to the normal/non-maximized state.

View File

@ -0,0 +1,8 @@
# `window:restore()`
*Since: nightly builds only*
Restores the window from the maximized state.
See also: [window:maximize()](maximize.md).