1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-26 06:42:12 +03:00

docs: update nightly features -> current release

This commit is contained in:
Wez Furlong 2023-03-20 21:29:43 -07:00
parent e8805a9db0
commit 3b8551e03c
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387
52 changed files with 88 additions and 60 deletions

1
.gitignore vendored
View File

@ -57,3 +57,4 @@ dhat-heap.json
.idea/
/winget-pkgs
/assets/flatpak/generated-sources.json
/__pycache__/

View File

@ -43,7 +43,7 @@ if ! hash pip3 >/dev/null ; then
PIP=pip
fi
$PIP install --quiet mkdocs-material mkdocs-git-revision-date-localized-plugin black mkdocs-exclude mkdocs-include-markdown-plugin
$PIP install --quiet mkdocs-material mkdocs-git-revision-date-localized-plugin black mkdocs-exclude mkdocs-include-markdown-plugin mkdocs-macros-plugin
if test -n "${CARDS}" ; then
$PIP install --quiet pillow cairosvg
fi

View File

@ -1,5 +0,0 @@
!!! info "*Since: nightly builds only*"
*The feature described in this section requires a nightly build of wezterm.
You can obtain a nightly build by following the instructions from the
[Download](/wezterm/installation.html) section.*

View File

@ -1,5 +0,0 @@
???+ info "*Since: nightly builds only*"
The feature described in this section requires a nightly build of wezterm.
You can obtain a nightly build by following the instructions from the
[Download](/wezterm/installation.html) section.

View File

@ -1,6 +1,6 @@
# `wezterm cli get-text`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
*Run `wezterm cli get-text --help` to see more help*

View File

@ -39,6 +39,7 @@ More complex configurations that need to span multiple files can be placed in
`$XDG_CONFIG_HOME/wezterm/wezterm.lua` (for X11/Wayland) or
`$HOME/.config/wezterm/wezterm.lua` (for all other systems).
{% raw %}
```mermaid
graph TD
X[Locate Configuration file] --> A{{--config-file CLI argument specified?}}
@ -56,6 +57,7 @@ graph TD
K -->|Yes| B
K -->|No| J[Use $HOME/.wezterm.lua]
```
{% endraw %}
Prior to version 20210314-114017-04b7cedd, if the candidate file exists but
failed to parse, wezterm would treat it as though it didn't exist and continue

View File

@ -37,6 +37,7 @@ And then some wezterm concepts:
This schematic depicts the processing flow for keyboard events in `wezterm`:
{% raw %}
```mermaid
flowchart TD
A[OS Generates a Key Event]
@ -72,6 +73,7 @@ RAWDONE1 --> RAWDONE3[Perform assignment action]
RAWDONE2 --> RAWDONE3
```
{% endraw %}
## Alt / Option Key Behavior & Composed Keys

View File

@ -149,6 +149,7 @@ return config
Fully working example is yet to be completely fleshed out (volunteers welcome!) but the
gist of it is:
{% raw %}
```lua
local wezterm = require 'wezterm'
local config = {}
@ -205,6 +206,7 @@ end
config.exec_domains = exec_domains
return config
```
{% endraw %}
With something like the config above, each time the config is reloaded, the
list of available domains will be updated.

View File

@ -1,6 +1,6 @@
# `domain:attach()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Attempts to attach the domain.

View File

@ -1,6 +1,6 @@
# `domain:detach()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Attempts to detach the domain.

View File

@ -1,6 +1,6 @@
# `domain:domain_id()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns the domain id.

View File

@ -1,6 +1,6 @@
# `domain:has_any_panes()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns `true` if the mux has any panes that belong to this domain.

View File

@ -1,6 +1,6 @@
# MuxDomain
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
`MuxDomain` represents a domain that is managed by the multiplexer.

View File

@ -1,6 +1,6 @@
# `domain:is_spawnable()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns `false` if this domain will never be able to spawn a new pane/tab/window, `true` otherwise.

View File

@ -1,6 +1,6 @@
# `domain:label()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Computes a label describing the name and state of the domain.
The label can change depending on the state of the domain.

View File

@ -1,6 +1,6 @@
# `domain:name()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns the name of the domain. Domain names are unique; no two domains can
have the same name, and the name is fixed for the lifetime of the domain.

View File

@ -1,6 +1,6 @@
# `domain:state()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns whether the domain is attached or not. The result is a string that is either:

View File

@ -1,6 +1,6 @@
# `tab:get_pane_direction(direction)`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns pane adjacent to the active pane in *tab* in the direction *direction*.

View File

@ -1,6 +1,6 @@
# `tab:get_size()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns the overall size of the tab, taking into account all of the contained
panes.

View File

@ -1,6 +1,6 @@
# tab:rotate_clockwise()
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Rotates the panes in the clockwise direction.

View File

@ -1,6 +1,6 @@
# tab:rotate_counter_clockwise()
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Rotates the panes in the counter clockwise direction.

View File

@ -12,7 +12,7 @@ assumes that Black+Bold renders as a Dark Grey which is
legible on a Black background, but if this option is set to
false, it would render as Black on Black.
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
This option can now have one of three values:

View File

@ -1,6 +1,6 @@
# `command_palette_bg_color = "#333333"`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Specifies the background color used by
[ActivateCommandPalette](../keyassignment/ActivateCommandPalette.md).

View File

@ -1,6 +1,6 @@
# `command_palette_fg_color = rgba(0.75, 0.75, 0.75, 1.0)`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Specifies the text color used by
[ActivateCommandPalette](../keyassignment/ActivateCommandPalette.md).

View File

@ -1,6 +1,6 @@
# `command_palette_font_size = 14.0`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Specifies the size of the font used with
[ActivateCommandPalette](../keyassignment/ActivateCommandPalette.md).

View File

@ -24,6 +24,7 @@ local Pane. If no `cwd` can be resolved, then the `default_cwd` will be used.
If `default_cwd` is not specified, then the home directory of the user will be
used.
{% raw %}
```mermaid
graph TD
X[Determine current working directory for new pane] --> A{{Is initial window?}}
@ -42,6 +43,7 @@ graph TD
L -->|No| F
```
{% endraw %}
On macOS and Linux, `wezterm` can attempt to resolve the process group leader
and then attempt to resolve its current working directory. This is not

View File

@ -1,6 +1,6 @@
# `hide_mouse_cursor_when_typing`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
If `true`, the mouse cursor will be hidden when typing, if your mouse cursor is
hovering over the window.

View File

@ -13,7 +13,7 @@ The value is a list of rule entries. Each entry has the following fields:
the first capture group. In the example below, `mailto:$0` is
used to prefix a protocol to the text to make it into an URL.
--8<-- "nightly-only-inline.md"
{{since('20230320-124340-559cb7b0', inline=True)}}
* `highlight` - specifies the range of the matched text that should be
highlighted/underlined when the mouse hovers over the link. The value is
a number that corresponds to a capture group in the regex. The default

View File

@ -1,6 +1,6 @@
# `quit_when_all_windows_are_closed = true`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
When set to `true`, wezterm will terminate when all windows are closed. This is
the default behavior.

View File

@ -1,6 +1,6 @@
# `gui-attached`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
This event is triggered when the GUI is starting up after attaching the
selected domain. For example, when you use `wezterm connect DOMAIN` or

View File

@ -1,6 +1,6 @@
# ActivateCommandPalette
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Activates the Command Palette, a modal overlay that enables discovery and activation of various commands.

View File

@ -7,7 +7,7 @@ Copy the selection to the clipboard.
This action is considered to be deprecated and will be removed in
a future release; please use [CopyTo](CopyTo.md) instead.
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
!!! warning
This action has been removed. Please use [CopyTo](CopyTo.md) instead.

View File

@ -1,6 +1,6 @@
# CopyMode 'MoveForwardWord'
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Moves the CopyMode cursor position forward to the end of word.

View File

@ -7,7 +7,7 @@ Paste the clipboard to the current pane.
This action is considered to be deprecated and will be removed in
a future release; please use [PasteFrom](PasteFrom.md) instead.
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
!!! warning
This action has been removed. Please use [PasteFrom](PasteFrom.md) instead.

View File

@ -8,7 +8,7 @@ On other systems, this behaves identically to [Paste](Paste.md).
This action is considered to be deprecated and will be removed in
a future release; please use [PasteFrom](PasteFrom.md) instead.
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
This action has been removed. Please use [PasteFrom](PasteFrom.md) instead.

View File

@ -1,6 +1,6 @@
# `pane:get_semantic_zone_at(x, y)`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Resolves the semantic zone that encapsulates the supplied *x* and *y* coordinates.

View File

@ -1,6 +1,6 @@
# `pane:get_semantic_zones([zone_type])`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
When *zone_type* is omitted, returns the list of all semantic zones defined in the pane.

View File

@ -1,6 +1,6 @@
# `pane:get_text_from_region(start_x, start_y, end_x, end_y)`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns the text from the specified region.

View File

@ -1,6 +1,6 @@
# `pane:get_text_from_semantic_zone(zone)`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
This is a convenience method that calls [pane:get_text_from_region()](get_text_from_region.md) on the supplied *zone* parameter.

View File

@ -1,6 +1,6 @@
# `wezterm.gui.gui_windows()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns an array table listing all GUI [Window](../window/index.md) objects in
a stable/consistent order.

View File

@ -1,6 +1,6 @@
# `wezterm.mux.all_domains()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns an array table holding all of the known
[MuxDomain](../MuxDomain/index.md) objects.

View File

@ -1,6 +1,6 @@
# `wezterm.mux.get_domain(name_or_id)`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Resolves `name_or_id` to a domain and returns a
[MuxDomain](../MuxDomain/index.md) object representation of it.

View File

@ -1,6 +1,6 @@
# `wezterm.mux.set_default_domain(MuxDomain)`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Assign a new default domain in the mux.

View File

@ -77,7 +77,7 @@ wezterm.mux.spawn_window { workspace = { 'coding' } }
### position
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Specify the initial position for the GUI window that will be created to display
this mux window.

View File

@ -1,6 +1,6 @@
# `wezterm.time.call_after(interval_seconds, function)`
*Since: 20220807-113146-c2fee766*
{{since('20220807-113146-c2fee766')}}
Arranges to call your callback function after the specified number of seconds
have elapsed.
@ -36,6 +36,6 @@ With great power comes great responsibility: if you schedule a lot of frequent
callbacks, or frequently reload your configuration in this way, you may
increase the CPU load on your system because you are asking it to work harder.
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
You can use fractional seconds to delay by more precise intervals.

View File

@ -1,6 +1,6 @@
# `wezterm.GLOBAL`
*Since: 20220624-141144-bd1b7c5d*
{{since('20220624-141144-bd1b7c5d')}}
Provides global, in-process, in-memory, data storage for json-like variables
that persists across config reloads.
@ -66,7 +66,7 @@ tab_titles['T0'] = 'Test'
wezterm.GLOBAL.tab_titles = tab_titles
```
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
You no longer need to split apart read/modify/write and the simple assignment
now works as you would expect:

View File

@ -1,6 +1,6 @@
# wezterm.config_builder()
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns a config builder object that can be used to define your configuration:

View File

@ -1,6 +1,6 @@
# `wezterm.default_hyperlink_rules()`
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Returns the compiled-in default values for [hyperlink_rules](../config/hyperlink_rules.md).

View File

@ -53,7 +53,7 @@ return {
However, wez strongly recommends that you use `chsh` inside the WSL domain to make
that the default shell if possible, so that you can avoid this additional configuration!
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
The `default_cwd` field is now automatically set to `"~"` to make it more
convenient to launch a WSL instance in the home directory of the configured

View File

@ -1,6 +1,6 @@
# window:focus()
--8<-- "nightly-only.md"
{{since('20230320-124340-559cb7b0')}}
Attempts to focus and activate the window.

View File

@ -49,6 +49,8 @@ theme:
- toc.follow
plugins:
- include-markdown
- macros:
module_name: mkdocs_macros
- search
- social:
cards: !ENV [CARDS, false]
@ -65,7 +67,6 @@ plugins:
- "SUMMARY.md"
- "book.toml"
- "overrides/**"
- "_snippets/**"
extra_css:
- style.css
@ -96,10 +97,6 @@ markdown_extensions:
- pymdownx.pathconverter:
base_path: "./docs"
- pymdownx.inlinehilite
- pymdownx.snippets:
base_path:
- "./docs/_snippets"
check_paths: true
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg

32
mkdocs_macros.py Normal file
View File

@ -0,0 +1,32 @@
# https://mkdocs-macros-plugin.readthedocs.io/en/latest/macros/
def define_env(env):
@env.macro
def since(vers, inline=False):
if vers == "nightly" and not inline:
return """
???+ info "*Since: Nightly Builds Only*"
The feature described in this section requires a nightly build of wezterm.
You can obtain a nightly build by following the instructions from the
[Download](/wezterm/installation.html) section.
"""
if vers == "nightly" and inline:
return """
!!! info "*Since: Nightly Builds Only*"
*The feature described in this section requires a nightly build of wezterm.
You can obtain a nightly build by following the instructions from the
[Download](/wezterm/installation.html) section.*
"""
if inline:
return f"""
!!! info "*Since: Version {vers}*"
*The feature described in this section requires version {vers} of wezterm,
or a more recent version.*
"""
return f"""
??? info "*Since: Version {vers}*"
The feature described in this section requires version {vers} of wezterm,
or a more recent version.
"""