1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 06:54:45 +03:00

docs: add_wsl_distributions_to_launch_menu was removed

Update WSL related info to reflect its removal and note about
how to achieve the same effect as turning it off.

refs: #2750
This commit is contained in:
Wez Furlong 2022-11-17 06:29:41 -07:00
parent 35fd69b0d5
commit 35e3e30d7a
No known key found for this signature in database
2 changed files with 1 additions and 43 deletions

View File

@ -426,7 +426,7 @@ As features stabilize some brief notes about them will accumulate here.
* Support for SGR-Pixels mouse reporting. Thanks to [Autumn Lamonte](https://gitlab.com/autumnmeowmeow)! [#1457](https://github.com/wez/wezterm/issues/1457)
* [ActivatePaneByIndex](config/lua/keyassignment/ActivatePaneByIndex.md) key assignment action. [#1517](https://github.com/wez/wezterm/issues/1517)
* Windows: wezterm may now use [win32-input-mode](https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md) to send high-fidelity keyboard input to ConPTY. This means that win32 console applications, such as [FAR Manager](https://github.com/FarGroup/FarManager) that use the low level `INPUT_RECORD` API will now receive key-up events as well as events for modifier-only key presses. Use `allow_win32_input_mode=true` to enable this. [#318](https://github.com/wez/wezterm/issues/318) [#1509](https://github.com/wez/wezterm/issues/1509) [#1510](https://github.com/wez/wezterm/issues/1510)
* Windows: [default_domain](config/lua/config/default_domain.md), [wsl_domains](config/lua/config/wsl_domains.md) options and [wezterm.default_wsl_domains()](config/lua/wezterm/default_wsl_domains.md) provide more flexibility for WSL users.
* Windows: [default_domain](config/lua/config/default_domain.md), [wsl_domains](config/lua/config/wsl_domains.md) options and [wezterm.default_wsl_domains()](config/lua/wezterm/default_wsl_domains.md) provide more flexibility for WSL users. The effect of `add_wsl_distributions_to_launch_menu=false` was replaced by `wsl_domains={}`.
* `Symbols Nerd Font Mono` is now bundled with WezTerm and is included as a default fallback font. This means that you may use any of the glyphs available in the [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts) collection with any font without patching fonts and without explicitly adding that font to your fallback list. Pomicons have an unclear license for distribution and are excluded from this bundled font, however, you may manually install the font with those icons from the Nerd Font site itself and it will take precedence over the bundled font. This font replaces the older `PowerlineExtraSymbols` font. [#1521](https://github.com/wez/wezterm/issues/1521).
* [wezterm.nerdfonts](config/lua/wezterm/nerdfonts.md) as a convenient way to resolve Nerd Fonts glyphs by name in your config file
* [ShowLauncherArgs](config/lua/keyassignment/ShowLauncherArgs.md) key assignment to show the launcher scoped to certain items, or to launch it directly in fuzzy matching mode

View File

@ -173,10 +173,6 @@ return {
Here's a fancy example that will add some helpful entries to the launcher
menu when running on Windows:
*since: 20200607-144723-74889cd4*: The launcher menu automatically includes WSL
entries by default, unless disabled using `add_wsl_distributions_to_launch_menu = false`.
```lua
local wezterm = require 'wezterm'
@ -207,44 +203,6 @@ if wezterm.target_triple == 'x86_64-pc-windows-msvc' then
},
})
end
-- Enumerate any WSL distributions that are installed and add those to the menu
local success, wsl_list, wsl_err =
wezterm.run_child_process { 'wsl.exe', '-l' }
-- `wsl.exe -l` has a bug where it always outputs utf16:
-- https://github.com/microsoft/WSL/issues/4607
-- So we get to convert it
wsl_list = wezterm.utf16_to_utf8(wsl_list)
for idx, line in ipairs(wezterm.split_by_newlines(wsl_list)) do
-- Skip the first line of output; it's just a header
if idx > 1 then
-- Remove the "(Default)" marker from the default line to arrive
-- at the distribution name on its own
local distro = line:gsub(' %(Default%)', '')
-- Add an entry that will spawn into the distro with the default shell
table.insert(launch_menu, {
label = distro .. ' (WSL default shell)',
args = { 'wsl.exe', '--distribution', distro },
})
-- Here's how to jump directly into some other program; in this example
-- its a shell that probably isn't the default, but it could also be
-- any other program that you want to run in that environment
table.insert(launch_menu, {
label = distro .. ' (WSL zsh login shell)',
args = {
'wsl.exe',
'--distribution',
distro,
'--exec',
'/bin/zsh',
'-l',
},
})
end
end
end
return {