1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-22 22:42:48 +03:00

docs: use snippets to make since: nightly more informative

... while also being less to type.
This commit is contained in:
Wez Furlong 2023-03-19 22:14:05 -07:00
parent 6b0a44eabd
commit 7d9b842d26
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387
45 changed files with 67 additions and 56 deletions

View File

@ -0,0 +1,5 @@
!!! 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

@ -0,0 +1,5 @@
???+ 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`
*Since: nightly builds only*
--8<-- "nightly-only.md"
*Run `wezterm cli get-text --help` to see more help*

View File

@ -1,6 +1,6 @@
# `domain:attach()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
Attempts to attach the domain.

View File

@ -1,6 +1,6 @@
# `domain:detach()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
Attempts to detach the domain.

View File

@ -1,6 +1,6 @@
# `domain:domain_id()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
Returns the domain id.

View File

@ -1,6 +1,6 @@
# `domain:has_any_panes()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
Returns `true` if the mux has any panes that belong to this domain.

View File

@ -1,6 +1,6 @@
# MuxDomain
*Since: nightly builds only*
--8<-- "nightly-only.md"
`MuxDomain` represents a domain that is managed by the multiplexer.

View File

@ -1,6 +1,6 @@
# `domain:is_spawnable()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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)`
*Since: nightly builds only*
--8<-- "nightly-only.md"
Returns pane adjacent to the active pane in *tab* in the direction *direction*.

View File

@ -1,6 +1,6 @@
# `tab:get_size()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
Returns the overall size of the tab, taking into account all of the contained
panes.

View File

@ -1,6 +1,6 @@
# tab:rotate_clockwise()
*Since: nightly builds only*
--8<-- "nightly-only.md"
Rotates the panes in the clockwise direction.

View File

@ -1,6 +1,6 @@
# tab:rotate_counter_clockwise()
*Since: nightly builds only*
--8<-- "nightly-only.md"
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.
*Since: nightly builds only*
--8<-- "nightly-only.md"
This option can now have one of three values:

View File

@ -1,6 +1,6 @@
# `command_palette_bg_color = "#333333"`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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)`
*Since: nightly builds only*
--8<-- "nightly-only.md"
Specifies the text color used by
[ActivateCommandPalette](../keyassignment/ActivateCommandPalette.md).

View File

@ -1,6 +1,6 @@
# `command_palette_font_size = 14.0`
*Since: nightly builds only*
--8<-- "nightly-only.md"
Specifies the size of the font used with
[ActivateCommandPalette](../keyassignment/ActivateCommandPalette.md).

View File

@ -1,6 +1,6 @@
# `hide_mouse_cursor_when_typing`
*Since: nightly builds only*
--8<-- "nightly-only.md"
If `true`, the mouse cursor will be hidden when typing, if your mouse cursor is
hovering over the window.

View File

@ -12,10 +12,13 @@ The value is a list of rule entries. Each entry has the following fields:
region of text matched by the whole regex, while `$1` matches out
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.
* `highlight` - (*Since: nightly builds only*) specifies the range
of the matched text that should be highlighted/underlined when
the mouse hovers over the link. The default is `0`, highlighting
the entire region of text matched by the regex.
--8<-- "nightly-only-inline.md"
* `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
is `0`, highlighting the entire region of text matched by the regex. `1`
would be the first capture group, and so on.
Assigning `hyperlink_rules` overrides the built-in default rules.

View File

@ -1,6 +1,6 @@
# `quit_when_all_windows_are_closed = true`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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
*Since: nightly builds only*
--8<-- "nightly-only.md"
Activates the Command Palette, a modal overlay that enables discovery and activation of various commands.

View File

@ -7,16 +7,8 @@ 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.
*Since: nightly builds only*
--8<-- "nightly-only.md"
This action has been removed. Please use [CopyTo](CopyTo.md) instead.
## Example
```lua
config.keys = {
{ key = 'C', mods = 'CTRL', action = wezterm.action.Copy },
}
```
!!! warning
This action has been removed. Please use [CopyTo](CopyTo.md) instead.

View File

@ -1,6 +1,6 @@
# CopyMode 'MoveForwardWord'
*Since: nightly builds only*
--8<-- "nightly-only.md"
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.
*Since: nightly builds only*
--8<-- "nightly-only.md"
!!! 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.
*Since: nightly builds only*
--8<-- "nightly-only.md"
This action has been removed. Please use [PasteFrom](PasteFrom.md) instead.

View File

@ -1,6 +1,6 @@
# `pane:get_semantic_zone_at(x, y)`
*Since: nightly builds only*
--8<-- "nightly-only.md"
Resolves the semantic zone that encapsulates the supplied *x* and *y* coordinates.

View File

@ -1,6 +1,6 @@
# `pane:get_semantic_zones([zone_type])`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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)`
*Since: nightly builds only*
--8<-- "nightly-only.md"
Returns the text from the specified region.

View File

@ -1,6 +1,6 @@
# `pane:get_text_from_semantic_zone(zone)`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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)`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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)`
*Since: nightly builds only*
--8<-- "nightly-only.md"
Assign a new default domain in the mux.

View File

@ -77,7 +77,7 @@ wezterm.mux.spawn_window { workspace = { 'coding' } }
### position
*Since: nightly builds only*
--8<-- "nightly-only.md"
Specify the initial position for the GUI window that will be created to display
this mux window.

View File

@ -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.
*Since: nightly builds only*
--8<-- "nightly-only.md"
You can use fractional seconds to delay by more precise intervals.

View File

@ -66,7 +66,7 @@ tab_titles['T0'] = 'Test'
wezterm.GLOBAL.tab_titles = tab_titles
```
*Since: nightly builds only*
--8<-- "nightly-only.md"
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()
*Since: nightly builds only*
--8<-- "nightly-only.md"
Returns a config builder object that can be used to define your configuration:

View File

@ -1,6 +1,6 @@
# `wezterm.default_hyperlink_rules()`
*Since: nightly builds only*
--8<-- "nightly-only.md"
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!
*Since: nightly builds only*
--8<-- "nightly-only.md"
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()
*Since: nightly builds only*
--8<-- "nightly-only.md"
Attempts to focus and activate the window.

View File

@ -65,6 +65,7 @@ plugins:
- "SUMMARY.md"
- "book.toml"
- "overrides/**"
- "_snippets/**"
extra_css:
- style.css
@ -92,8 +93,13 @@ markdown_extensions:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.pathconverter:
base_path: "./docs"
- pymdownx.inlinehilite
- pymdownx.snippets
- 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