diff options
| author | a-kenji <aks.kenji@protonmail.com> | 2021-05-12 09:42:05 +0200 |
|---|---|---|
| committer | a-kenji <aks.kenji@protonmail.com> | 2021-05-12 09:57:47 +0200 |
| commit | 6ffd698d0a1a974f0cb80cb256f4d58e2c3d97f6 (patch) | |
| tree | 47d16f195a9cb7e26750fcadb51f61a41e96788b /src/client | |
| parent | docs(changelog): Add Option for Simplified Layout (diff) | |
| download | sl0ppij-6ffd698d0a1a974f0cb80cb256f4d58e2c3d97f6.tar.gz sl0ppij-6ffd698d0a1a974f0cb80cb256f4d58e2c3d97f6.tar.xz sl0ppij-6ffd698d0a1a974f0cb80cb256f4d58e2c3d97f6.zip | |
Slight rework of config loading.
Merges the cli and file configuration
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs index 8fcbc070..154f1437 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -15,6 +15,7 @@ use crate::common::{ errors::{ClientContext, ContextType}, input::config::Config, input::handler::input_loop, + input::options::{ConfigOptions, Options}, os_input_output::ClientOsApi, thread_bus::{SenderType, SenderWithContext, SyncChannelWithContext}, }; @@ -40,12 +41,15 @@ pub fn start_client(mut os_input: Box<dyn ClientOsApi>, opts: CliArgs, config: C let mut command_is_executing = CommandIsExecuting::new(); + let config_options: ConfigOptions = + Options::from_cli(&config.options, opts.option.clone()).into(); + let full_screen_ws = os_input.get_terminal_size_using_fd(0); os_input.connect_to_server(); os_input.send_to_server(ServerInstruction::NewClient( full_screen_ws, opts, - config.options.clone(), + config_options, )); os_input.set_raw_mode(0); |
