Skip to content

domain:attach()

Since: Version 20230320-124340-559cb7b0

The functionality described in this section requires version 20230320-124340-559cb7b0 of wezterm, or a more recent version.

Attempts to attach the domain.

Attaching a domain will attempt to import the windows, tabs and panes from the remote system into those of the local GUI.

Unlike the AttachDomain key assignment, calling domain:attach() will not implicitly spawn a new pane into the domain if the domain contains no panes. This is to provide flexibility when used in the gui-startup event.

If the domain is already attached, calling this method again has no effect.

See also: domain:detach() and domain:state().