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:
parent
6b0a44eabd
commit
7d9b842d26
5
docs/_snippets/nightly-only-inline.md
Normal file
5
docs/_snippets/nightly-only-inline.md
Normal 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.*
|
||||
|
5
docs/_snippets/nightly-only.md
Normal file
5
docs/_snippets/nightly-only.md
Normal 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.
|
||||
|
@ -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*
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# `domain:attach()`
|
||||
|
||||
*Since: nightly builds only*
|
||||
--8<-- "nightly-only.md"
|
||||
|
||||
Attempts to attach the domain.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# `domain:detach()`
|
||||
|
||||
*Since: nightly builds only*
|
||||
--8<-- "nightly-only.md"
|
||||
|
||||
Attempts to detach the domain.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# `domain:domain_id()`
|
||||
|
||||
*Since: nightly builds only*
|
||||
--8<-- "nightly-only.md"
|
||||
|
||||
Returns the domain id.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# MuxDomain
|
||||
|
||||
*Since: nightly builds only*
|
||||
--8<-- "nightly-only.md"
|
||||
|
||||
`MuxDomain` represents a domain that is managed by the multiplexer.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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*.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# tab:rotate_clockwise()
|
||||
|
||||
*Since: nightly builds only*
|
||||
--8<-- "nightly-only.md"
|
||||
|
||||
Rotates the panes in the clockwise direction.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# tab:rotate_counter_clockwise()
|
||||
|
||||
*Since: nightly builds only*
|
||||
--8<-- "nightly-only.md"
|
||||
|
||||
Rotates the panes in the counter clockwise direction.
|
||||
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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).
|
||||
|
@ -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).
|
||||
|
@ -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).
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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).
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,6 +1,6 @@
|
||||
# window:focus()
|
||||
|
||||
*Since: nightly builds only*
|
||||
--8<-- "nightly-only.md"
|
||||
|
||||
Attempts to focus and activate the window.
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user