From e55233aa3d6a2ff81f08c96c8cd7be2e0af12984 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 9 Jun 2019 11:41:47 -0700 Subject: [PATCH] add option to use mux domain --- src/main.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 13e2c8a62..0dbd36461 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,6 +89,11 @@ struct StartCommand { )] font_system: Option, + /// If true, use the incomplete multiplexer client as the + /// default domain for new tabs and windows + #[structopt(long = "broken-mux-client-as-default-domain")] + broken_mux_client_as_default_domain: bool, + /// Instead of executing your shell, run PROG. /// For example: `wezterm start -- bash -l` will spawn bash /// as if it were a login shell. @@ -125,7 +130,14 @@ fn run_terminal_gui(config: Arc, opts: &StartCommand) -> Result< None }; - let domain: Arc = Arc::new(LocalDomain::new(&config)?); + let domain: Arc = if opts.broken_mux_client_as_default_domain { + use crate::server::client::Client; + use crate::server::domain::ClientDomain; + let client = Client::new(&config)?; + Arc::new(ClientDomain::new(client)) + } else { + Arc::new(LocalDomain::new(&config)?) + }; let mux = Rc::new(mux::Mux::new(&config, &domain)); Mux::set_mux(&mux);