diff options
Diffstat (limited to 'src')
4 files changed, 34 insertions, 19 deletions
diff --git a/src/main.rs b/src/main.rs index 1a3a16ed6..f0d00f77a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,14 +24,6 @@ pub fn main() { list_sessions(); } - let (config, layout, config_options) = match Setup::from_options(&opts) { - Ok(results) => results, - Err(e) => { - eprintln!("{}", e); - process::exit(1); - } - }; - atomic_create_dir(&*ZELLIJ_TMP_DIR).unwrap(); atomic_create_dir(&*ZELLIJ_TMP_LOG_DIR).unwrap(); if let Some(path) = opts.server { @@ -62,6 +54,14 @@ pub fn main() { session_name = Some(get_active_session()); } + let (config, _, config_options) = match Setup::from_options(&opts) { + Ok(results) => results, + Err(e) => { + eprintln!("{}", e); + process::exit(1); + } + }; + start_client( Box::new(os_input), opts, @@ -70,6 +70,14 @@ pub fn main() { None, ); } else { + let (config, layout, _) = match Setup::from_options(&opts) { + Ok(results) => results, + Err(e) => { + eprintln!("{}", e); + process::exit(1); + } + }; + let session_name = opts .session .clone() diff --git a/src/tests/fixtures/layouts/parts-total-less-than-100-percent.yaml b/src/tests/fixtures/layouts/parts-total-less-than-100-percent.yaml index e1a1a6071..f0f66a323 100644 --- a/src/tests/fixtures/layouts/parts-total-less-than-100-percent.yaml +++ b/src/tests/fixtures/layouts/parts-total-less-than-100-percent.yaml @@ -9,6 +9,8 @@ - direction: Horizontal split_size: Percent: 50 + tabs: + - direction: Horizontal split_size: Percent: 80 - direction: Vertical diff --git a/src/tests/fixtures/layouts/parts-total-more-than-100-percent.yaml b/src/tests/fixtures/layouts/parts-total-more-than-100-percent.yaml index 33d942253..2b55547d4 100644 --- a/src/tests/fixtures/layouts/parts-total-more-than-100-percent.yaml +++ b/src/tests/fixtures/layouts/parts-total-more-than-100-percent.yaml @@ -9,6 +9,9 @@ - direction: Horizontal split_size: Percent: 90 + - direction: Horizontal + tabs: + - direction: Horizontal split_size: Percent: 80 - direction: Vertical diff --git a/src/tests/fixtures/layouts/three-panes-with-nesting.yaml b/src/tests/fixtures/layouts/three-panes-with-nesting.yaml index f1e0dd7e5..20a647f3d 100644 --- a/src/tests/fixtures/layouts/three-panes-with-nesting.yaml +++ b/src/tests/fixtures/layouts/three-panes-with-nesting.yaml @@ -1,16 +1,18 @@ --- direction: Horizontal -parts: - - direction: Vertical +tabs: + - direction: Horizontal parts: - - direction: Horizontal - split_size: - Percent: 20 - - direction: Horizontal + - direction: Vertical + parts: + - direction: Horizontal + split_size: + Percent: 20 + - direction: Horizontal + split_size: + Percent: 80 split_size: Percent: 80 - split_size: - Percent: 80 - - direction: Vertical - split_size: - Percent: 20 + - direction: Vertical + split_size: + Percent: 20 |