wezterm.mux module exposes functions that operate on the multiplexer layer.
The multiplexer manages the set of running programs into panes, tabs, windows and workspaces.
The multiplexer may not be connected to a GUI so certain operations that require a running Window management system are not present in the interface exposed by this module.
You will typically use something like:
local wezterm = require 'wezterm' local mux = wezterm.mux
at the top of your configuration file to access it.
You should avoid using, at the file scope in your config, mux functions that cause new splits, tabs or windows to be created. The configuration file can be evaluated multiple times in various contexts. If you want to spawn new programs when wezterm starts up, look at the gui-startup and mux-startup events.