mirror of
https://github.com/wez/wezterm.git
synced 2024-11-26 16:34:23 +03:00
parent
850fdf40de
commit
b009e8c0d4
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,6 +13,7 @@
|
||||
/docs/install/*.md
|
||||
/docs/config/lua/wezterm/index.md
|
||||
/docs/config/lua/pane/index.md
|
||||
/docs/config/lua/window/index.md
|
||||
**/*.rs.bk
|
||||
.*.sw*
|
||||
/esctest.log
|
||||
|
@ -78,6 +78,7 @@ TOC = [
|
||||
children=[
|
||||
Gen("module: wezterm", "config/lua/wezterm"),
|
||||
Gen("object: Pane", "config/lua/pane"),
|
||||
Gen("object: Window", "config/lua/window"),
|
||||
],
|
||||
),
|
||||
Page("Scrollback", "scrollback.markdown"),
|
||||
|
@ -54,6 +54,14 @@ wezterm.on("open-uri", function(window, pane, uri)
|
||||
end)
|
||||
```
|
||||
|
||||
The first event parameter is a [`window` object](../window/index.md) that
|
||||
represents the gui window.
|
||||
|
||||
The second event parameter is a [`pane` object](../pane/index.md) that
|
||||
represents the pane.
|
||||
|
||||
The third event parameter is the URI string.
|
||||
|
||||
## Custom Events
|
||||
|
||||
You may register handlers for arbitrary events for which wezterm itself
|
||||
@ -108,3 +116,8 @@ return {
|
||||
}
|
||||
```
|
||||
|
||||
The first event parameter is a [`window` object](../window/index.md) that
|
||||
represents the gui window.
|
||||
|
||||
The second event parameter is a [`pane` object](../pane/index.md) that
|
||||
represents the pane.
|
||||
|
16
docs/config/lua/window/perform_action.md
Normal file
16
docs/config/lua/window/perform_action.md
Normal file
@ -0,0 +1,16 @@
|
||||
# `window:perform_action(key_assignment, pane)`
|
||||
|
||||
*Since: nightly builds only*
|
||||
|
||||
Performs a key assignment against the `window` and `pane`.
|
||||
There are a number of actions that can be performed against a `pane` in
|
||||
a `window` when configured via the `keys` and `mouse` configuration options.
|
||||
|
||||
This method allows your lua script to trigger those actions for itself.
|
||||
|
||||
The first parameter is a key assignment such as that returned by [`wezterm.action`](../wezterm/action.md).
|
||||
|
||||
The second parameter is a `pane` object passed to your event callback.
|
||||
|
||||
For an example of this method in action, see [`wezterm.on Custom Events`](../wezterm/on.md#custom-events).
|
||||
|
8
docs/config/lua/window/window_id.md
Normal file
8
docs/config/lua/window/window_id.md
Normal file
@ -0,0 +1,8 @@
|
||||
# `window:window_id()`
|
||||
|
||||
*Since: nightly builds only*
|
||||
|
||||
Returns the id number for the window. The Id is used to identify the window
|
||||
within the internal multiplexer and can be used when making API calls
|
||||
via `wezterm cli` to indicate the subject of manipulation.
|
||||
|
Loading…
Reference in New Issue
Block a user