Files
LLeMbas-TTY/docs/config/lua/config/default_domain.md
T
Wez Furlong c7ff432581 mux server: register additional domains
Relocate the helper function to mux-server-impl and have both the GUI
and the mux server call it at the appropriate times.

Introduce default_mux_server_domain which is used instead of
default_domain in the mux server.  This is to avoid recursive
cycles when starting up the mux; we don't want the default
domain to be a unix client that connects to our selves because
we'll try to connect to ourselves, then in act of handling that
spawn in the default domain and try to connect to ourselves and
repeat.

refs: https://github.com/wez/wezterm/issues/3907
2023-07-11 09:34:34 -07:00

1.6 KiB

tags
tags
multiplexing

default_domain = "local"

{{since('20220319-142410-0fcdea07')}}

!!! note This option only applies to the GUI. For the equivalent option in the standalone mux server, see default_mux_server_domain

When starting the GUI (not using the serial or connect subcommands), by default wezterm will set the built-in "local" domain as the default multiplexing domain.

The "local" domain represents processes that are spawned directly on the local system.

Windows users, particularly those who use WSL, may wish to override the default domain to instead use a particular WSL distribution so that wezterm launches directly into a Linux shell rather than having to manually invoke wsl.exe. Using a WslDomain for this has the advantage that wezterm can then use shell integration to track the current directory inside WSL and use it when splitting new panes or spawning new tabs.

For example, if:

; wsl -l -v
  NAME            STATE           VERSION
* Ubuntu-18.04    Running         1

then wezterm will by default create a WslDomain with the name "WSL:Ubuntu-18.04" and if I set my config like this:

config.default_domain = 'WSL:Ubuntu-18.04'

then when wezterm starts up, it will open with a shell running inside that Ubuntu distribution rather than using the default cmd or powershell.

While these examples are WSL-centric, default_domain will accept the name of any of the available multiplexing domains.