diff --git a/docs/_snippets/nightly-only-inline.md b/docs/_snippets/nightly-only-inline.md new file mode 100644 index 000000000..577b3af39 --- /dev/null +++ b/docs/_snippets/nightly-only-inline.md @@ -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.* + diff --git a/docs/_snippets/nightly-only.md b/docs/_snippets/nightly-only.md new file mode 100644 index 000000000..245e88b3d --- /dev/null +++ b/docs/_snippets/nightly-only.md @@ -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. + diff --git a/docs/cli/cli/get-text.md b/docs/cli/cli/get-text.md index 1f34536e2..ce029eace 100644 --- a/docs/cli/cli/get-text.md +++ b/docs/cli/cli/get-text.md @@ -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* diff --git a/docs/config/lua/MuxDomain/attach.md b/docs/config/lua/MuxDomain/attach.md index 7d12ac2c8..4263d95a8 100644 --- a/docs/config/lua/MuxDomain/attach.md +++ b/docs/config/lua/MuxDomain/attach.md @@ -1,6 +1,6 @@ # `domain:attach()` -*Since: nightly builds only* +--8<-- "nightly-only.md" Attempts to attach the domain. diff --git a/docs/config/lua/MuxDomain/detach.md b/docs/config/lua/MuxDomain/detach.md index 9ef0beada..093b95656 100644 --- a/docs/config/lua/MuxDomain/detach.md +++ b/docs/config/lua/MuxDomain/detach.md @@ -1,6 +1,6 @@ # `domain:detach()` -*Since: nightly builds only* +--8<-- "nightly-only.md" Attempts to detach the domain. diff --git a/docs/config/lua/MuxDomain/domain_id.md b/docs/config/lua/MuxDomain/domain_id.md index bda60976b..51d26c3f7 100644 --- a/docs/config/lua/MuxDomain/domain_id.md +++ b/docs/config/lua/MuxDomain/domain_id.md @@ -1,6 +1,6 @@ # `domain:domain_id()` -*Since: nightly builds only* +--8<-- "nightly-only.md" Returns the domain id. diff --git a/docs/config/lua/MuxDomain/has_any_panes.md b/docs/config/lua/MuxDomain/has_any_panes.md index 7ccdc8ea3..c0564501b 100644 --- a/docs/config/lua/MuxDomain/has_any_panes.md +++ b/docs/config/lua/MuxDomain/has_any_panes.md @@ -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. diff --git a/docs/config/lua/MuxDomain/index.markdown b/docs/config/lua/MuxDomain/index.markdown index 30ac84c99..17defc832 100644 --- a/docs/config/lua/MuxDomain/index.markdown +++ b/docs/config/lua/MuxDomain/index.markdown @@ -1,6 +1,6 @@ # MuxDomain -*Since: nightly builds only* +--8<-- "nightly-only.md" `MuxDomain` represents a domain that is managed by the multiplexer. diff --git a/docs/config/lua/MuxDomain/is_spawnable.md b/docs/config/lua/MuxDomain/is_spawnable.md index 4051feb93..a2bbe719c 100644 --- a/docs/config/lua/MuxDomain/is_spawnable.md +++ b/docs/config/lua/MuxDomain/is_spawnable.md @@ -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. diff --git a/docs/config/lua/MuxDomain/label.md b/docs/config/lua/MuxDomain/label.md index dc7b1910f..b908a956a 100644 --- a/docs/config/lua/MuxDomain/label.md +++ b/docs/config/lua/MuxDomain/label.md @@ -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. diff --git a/docs/config/lua/MuxDomain/name.md b/docs/config/lua/MuxDomain/name.md index ee3b8b27e..5549116d9 100644 --- a/docs/config/lua/MuxDomain/name.md +++ b/docs/config/lua/MuxDomain/name.md @@ -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. diff --git a/docs/config/lua/MuxDomain/state.md b/docs/config/lua/MuxDomain/state.md index 1e3b998ca..478b36fcd 100644 --- a/docs/config/lua/MuxDomain/state.md +++ b/docs/config/lua/MuxDomain/state.md @@ -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: diff --git a/docs/config/lua/MuxTab/get_pane_direction.md b/docs/config/lua/MuxTab/get_pane_direction.md index de413ef86..214be89cc 100644 --- a/docs/config/lua/MuxTab/get_pane_direction.md +++ b/docs/config/lua/MuxTab/get_pane_direction.md @@ -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*. diff --git a/docs/config/lua/MuxTab/get_size.md b/docs/config/lua/MuxTab/get_size.md index e78820439..cfa3d8c6c 100644 --- a/docs/config/lua/MuxTab/get_size.md +++ b/docs/config/lua/MuxTab/get_size.md @@ -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. diff --git a/docs/config/lua/MuxTab/rotate_clockwise.md b/docs/config/lua/MuxTab/rotate_clockwise.md index 757500225..8c0ef686b 100644 --- a/docs/config/lua/MuxTab/rotate_clockwise.md +++ b/docs/config/lua/MuxTab/rotate_clockwise.md @@ -1,6 +1,6 @@ # tab:rotate_clockwise() -*Since: nightly builds only* +--8<-- "nightly-only.md" Rotates the panes in the clockwise direction. diff --git a/docs/config/lua/MuxTab/rotate_counter_clockwise.md b/docs/config/lua/MuxTab/rotate_counter_clockwise.md index 9225974f0..6e1f7f8f1 100644 --- a/docs/config/lua/MuxTab/rotate_counter_clockwise.md +++ b/docs/config/lua/MuxTab/rotate_counter_clockwise.md @@ -1,6 +1,6 @@ # tab:rotate_counter_clockwise() -*Since: nightly builds only* +--8<-- "nightly-only.md" Rotates the panes in the counter clockwise direction. diff --git a/docs/config/lua/config/bold_brightens_ansi_colors.md b/docs/config/lua/config/bold_brightens_ansi_colors.md index 9b3eee713..d39cb6fbf 100644 --- a/docs/config/lua/config/bold_brightens_ansi_colors.md +++ b/docs/config/lua/config/bold_brightens_ansi_colors.md @@ -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: diff --git a/docs/config/lua/config/command_palette_bg_color.md b/docs/config/lua/config/command_palette_bg_color.md index dcee89423..e3548fe96 100644 --- a/docs/config/lua/config/command_palette_bg_color.md +++ b/docs/config/lua/config/command_palette_bg_color.md @@ -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). diff --git a/docs/config/lua/config/command_palette_fg_color.md b/docs/config/lua/config/command_palette_fg_color.md index bf8c0bcce..1b5c92dd8 100644 --- a/docs/config/lua/config/command_palette_fg_color.md +++ b/docs/config/lua/config/command_palette_fg_color.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). diff --git a/docs/config/lua/config/command_palette_font_size.md b/docs/config/lua/config/command_palette_font_size.md index 683920eca..7fb6d4186 100644 --- a/docs/config/lua/config/command_palette_font_size.md +++ b/docs/config/lua/config/command_palette_font_size.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). diff --git a/docs/config/lua/config/hide_mouse_cursor_when_typing.md b/docs/config/lua/config/hide_mouse_cursor_when_typing.md index 3cdbd0fc7..c83ba67ed 100644 --- a/docs/config/lua/config/hide_mouse_cursor_when_typing.md +++ b/docs/config/lua/config/hide_mouse_cursor_when_typing.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. diff --git a/docs/config/lua/config/hyperlink_rules.md b/docs/config/lua/config/hyperlink_rules.md index 91768a398..58c998bc6 100644 --- a/docs/config/lua/config/hyperlink_rules.md +++ b/docs/config/lua/config/hyperlink_rules.md @@ -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. diff --git a/docs/config/lua/config/quit_when_all_windows_are_closed.md b/docs/config/lua/config/quit_when_all_windows_are_closed.md index 5da80acc6..b97b4d847 100644 --- a/docs/config/lua/config/quit_when_all_windows_are_closed.md +++ b/docs/config/lua/config/quit_when_all_windows_are_closed.md @@ -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. diff --git a/docs/config/lua/gui-events/gui-attached.md b/docs/config/lua/gui-events/gui-attached.md index ecd9774b8..d40a60201 100644 --- a/docs/config/lua/gui-events/gui-attached.md +++ b/docs/config/lua/gui-events/gui-attached.md @@ -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 diff --git a/docs/config/lua/keyassignment/ActivateCommandPalette.md b/docs/config/lua/keyassignment/ActivateCommandPalette.md index 18908a5c4..c2cb2fcfc 100644 --- a/docs/config/lua/keyassignment/ActivateCommandPalette.md +++ b/docs/config/lua/keyassignment/ActivateCommandPalette.md @@ -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. diff --git a/docs/config/lua/keyassignment/Copy.md b/docs/config/lua/keyassignment/Copy.md index b8ae7e209..1c277c9f3 100644 --- a/docs/config/lua/keyassignment/Copy.md +++ b/docs/config/lua/keyassignment/Copy.md @@ -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. diff --git a/docs/config/lua/keyassignment/CopyMode/MoveForwardWordEnd.md b/docs/config/lua/keyassignment/CopyMode/MoveForwardWordEnd.md index 0d8193491..ca0f7abb3 100644 --- a/docs/config/lua/keyassignment/CopyMode/MoveForwardWordEnd.md +++ b/docs/config/lua/keyassignment/CopyMode/MoveForwardWordEnd.md @@ -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. diff --git a/docs/config/lua/keyassignment/Paste.md b/docs/config/lua/keyassignment/Paste.md index 5f25efabf..a31fd03b7 100644 --- a/docs/config/lua/keyassignment/Paste.md +++ b/docs/config/lua/keyassignment/Paste.md @@ -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. diff --git a/docs/config/lua/keyassignment/PastePrimarySelection.md b/docs/config/lua/keyassignment/PastePrimarySelection.md index 5692db09c..f4eb38fd1 100644 --- a/docs/config/lua/keyassignment/PastePrimarySelection.md +++ b/docs/config/lua/keyassignment/PastePrimarySelection.md @@ -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. diff --git a/docs/config/lua/pane/get_semantic_zone_at.md b/docs/config/lua/pane/get_semantic_zone_at.md index 2478fd3a6..077728273 100644 --- a/docs/config/lua/pane/get_semantic_zone_at.md +++ b/docs/config/lua/pane/get_semantic_zone_at.md @@ -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. diff --git a/docs/config/lua/pane/get_semantic_zones.md b/docs/config/lua/pane/get_semantic_zones.md index 81b489405..5d4273e71 100644 --- a/docs/config/lua/pane/get_semantic_zones.md +++ b/docs/config/lua/pane/get_semantic_zones.md @@ -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. diff --git a/docs/config/lua/pane/get_text_from_region.md b/docs/config/lua/pane/get_text_from_region.md index 6addd931a..d7427dc5e 100644 --- a/docs/config/lua/pane/get_text_from_region.md +++ b/docs/config/lua/pane/get_text_from_region.md @@ -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. diff --git a/docs/config/lua/pane/get_text_from_semantic_zone.md b/docs/config/lua/pane/get_text_from_semantic_zone.md index da7a60bd6..53cbe3e17 100644 --- a/docs/config/lua/pane/get_text_from_semantic_zone.md +++ b/docs/config/lua/pane/get_text_from_semantic_zone.md @@ -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. diff --git a/docs/config/lua/wezterm.gui/gui_windows.md b/docs/config/lua/wezterm.gui/gui_windows.md index 749ce8d55..d27314ba5 100644 --- a/docs/config/lua/wezterm.gui/gui_windows.md +++ b/docs/config/lua/wezterm.gui/gui_windows.md @@ -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. diff --git a/docs/config/lua/wezterm.mux/all_domains.md b/docs/config/lua/wezterm.mux/all_domains.md index cbd168d9a..6a0e2200c 100644 --- a/docs/config/lua/wezterm.mux/all_domains.md +++ b/docs/config/lua/wezterm.mux/all_domains.md @@ -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. diff --git a/docs/config/lua/wezterm.mux/get_domain.md b/docs/config/lua/wezterm.mux/get_domain.md index 481035a80..342ab1713 100644 --- a/docs/config/lua/wezterm.mux/get_domain.md +++ b/docs/config/lua/wezterm.mux/get_domain.md @@ -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. diff --git a/docs/config/lua/wezterm.mux/set_default_domain.md b/docs/config/lua/wezterm.mux/set_default_domain.md index 46ae1353f..233c7e209 100644 --- a/docs/config/lua/wezterm.mux/set_default_domain.md +++ b/docs/config/lua/wezterm.mux/set_default_domain.md @@ -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. diff --git a/docs/config/lua/wezterm.mux/spawn_window.md b/docs/config/lua/wezterm.mux/spawn_window.md index 836da30aa..fc239f62e 100644 --- a/docs/config/lua/wezterm.mux/spawn_window.md +++ b/docs/config/lua/wezterm.mux/spawn_window.md @@ -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. diff --git a/docs/config/lua/wezterm.time/call_after.md b/docs/config/lua/wezterm.time/call_after.md index db7eb376c..f54886991 100644 --- a/docs/config/lua/wezterm.time/call_after.md +++ b/docs/config/lua/wezterm.time/call_after.md @@ -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. diff --git a/docs/config/lua/wezterm/GLOBAL.md b/docs/config/lua/wezterm/GLOBAL.md index 0b7c1a231..068fce05a 100644 --- a/docs/config/lua/wezterm/GLOBAL.md +++ b/docs/config/lua/wezterm/GLOBAL.md @@ -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: diff --git a/docs/config/lua/wezterm/config_builder.md b/docs/config/lua/wezterm/config_builder.md index 3ea85a0eb..2de8fd600 100644 --- a/docs/config/lua/wezterm/config_builder.md +++ b/docs/config/lua/wezterm/config_builder.md @@ -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: diff --git a/docs/config/lua/wezterm/default_hyperlink_rules.md b/docs/config/lua/wezterm/default_hyperlink_rules.md index 101284da8..ccf385224 100644 --- a/docs/config/lua/wezterm/default_hyperlink_rules.md +++ b/docs/config/lua/wezterm/default_hyperlink_rules.md @@ -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). diff --git a/docs/config/lua/wezterm/default_wsl_domains.md b/docs/config/lua/wezterm/default_wsl_domains.md index f691d2186..c39ad300f 100644 --- a/docs/config/lua/wezterm/default_wsl_domains.md +++ b/docs/config/lua/wezterm/default_wsl_domains.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 diff --git a/docs/config/lua/window/focus.md b/docs/config/lua/window/focus.md index 73e1b2f65..55f3ad818 100644 --- a/docs/config/lua/window/focus.md +++ b/docs/config/lua/window/focus.md @@ -1,6 +1,6 @@ # window:focus() -*Since: nightly builds only* +--8<-- "nightly-only.md" Attempts to focus and activate the window. diff --git a/docs/mkdocs-base.yml b/docs/mkdocs-base.yml index a42bbd4d6..ad0656e38 100644 --- a/docs/mkdocs-base.yml +++ b/docs/mkdocs-base.yml @@ -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