mirror of
https://github.com/wez/wezterm.git
synced 2024-11-27 12:23:46 +03:00
Add default_domain option
When set, changes the default domain to the domain with the specified name, which potentially affects the default program. eg: default_domain = "WSL:Ubuntu-18.04" will cause the initial tab to be spawned via WSL.
This commit is contained in:
parent
cdf3fc89f7
commit
b2ee6793f9
@ -1266,6 +1266,9 @@ pub struct Config {
|
||||
|
||||
#[serde(default)]
|
||||
pub allow_win32_input_mode: bool,
|
||||
|
||||
#[serde(default)]
|
||||
pub default_domain: Option<String>,
|
||||
}
|
||||
impl_lua_conversion!(Config);
|
||||
|
||||
|
@ -338,6 +338,12 @@ async fn update_mux_domains(config: &ConfigHandle, do_auto_connect: bool) -> any
|
||||
mux.add_domain(&domain);
|
||||
}
|
||||
|
||||
if let Some(name) = &config.default_domain {
|
||||
if let Some(dom) = mux.get_domain_by_name(name) {
|
||||
mux.set_default_domain(&dom);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user