diff options
| author | har7an <99636919+har7an@users.noreply.github.com> | 2026-01-26 18:05:51 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-26 18:05:51 +0000 |
| commit | bdf20eef50f2d68501be708ec5ee38dbe9366a91 (patch) | |
| tree | e97215a9464d322eb65e416b1662c530e44d57f1 /zellij-utils/src | |
| parent | fix: get "zellij run --session" to also work on sessions that have no attache... (diff) | |
| download | sl0ppij-bdf20eef50f2d68501be708ec5ee38dbe9366a91.tar.gz sl0ppij-bdf20eef50f2d68501be708ec5ee38dbe9366a91.tar.xz sl0ppij-bdf20eef50f2d68501be708ec5ee38dbe9366a91.zip | |
Fix loading short layouts and custom config dirs (#4640)
* test(e2e): Write a regression test to validate behavior
w.r.t. loading and determining the session layout file. Compared to
release v0.43.1, right now there is a problem where `zellij --layout
NAME`, with `NAME` being the filename of a layout in the
`$ZELLIJ_DATA_DIR/layouts/` subfolder, doesn't resolve to the correct
layout file. Instead, zellij will silently fall back to its default
config. It does, however, recognize nonexistent configuration files.
* fix(utils): Treat bare layout names as file paths first
before defaulting to builtin layout names. This restores the behavior
shown by zellij up until 0.43.1, which was altered in a recent extension
of the server-client API.
* fix: Forward client layout information to startup code
and ensure it isn't ignored along the way. Update a bunch of tests to
react to the new function interface and write new tests to catch
deviations in the future.
* test: Fix misconfigured e2e test
to ensure that a custom `--config-dir` is indeed respected during
application startup.
* test: Rewrite config dir test to not use variable metadata
since the `LayoutInfo` object previously dumped into the snapshot
contains information that isn't platform agnostic, including an absolute
file path and a timestamp.
* docs(CHANGELOG): Mention PR #4640
in the list of changes for the next release.
* fix: Handle bare layouts with name "default" correctly
and assume a "default" layout if no layout name is given during layout
resolution. "default" may not always be the builtin default layout,
since users can write their own "default.kdl" that takes effect when
placed in the layout directory an no other layouts are explicitly
specified.
Diffstat (limited to 'zellij-utils/src')
8 files changed, 152 insertions, 2385 deletions
diff --git a/zellij-utils/src/data.rs b/zellij-utils/src/data.rs index 68d15725..15d74b54 100644 --- a/zellij-utils/src/data.rs +++ b/zellij-utils/src/data.rs @@ -2006,32 +2006,60 @@ impl LayoutInfo { } pub fn from_config( layout_dir: &Option<PathBuf>, - layout_path: &Option<PathBuf>, + maybe_layout_path: &Option<PathBuf>, ) -> Option<Self> { - match layout_path { - Some(layout_path) => { - if layout_path.extension().is_some() || layout_path.components().count() > 1 { - let Some(layout_dir) = layout_dir - .as_ref() - .map(|l| l.clone()) - .or_else(default_layout_dir) - else { - return None; - }; - let file_path = layout_dir.join(layout_path); - Some(LayoutInfo::File( - // layout_dir.join(layout_path).display().to_string(), + // If we're not given a layout path, fall back to "default". Since we cannot tell ahead of + // time whether the user has a layout named "default.kdl" in their layout directory, we + // cannot blindly assume that this is indeed the builtin default layout. The layout + // resolution below will correctly handle this. + // The docs promise this behavior, so we have to abide: + // <https://zellij.dev/documentation/layouts.html#layout-default-directory> + let layout_path = maybe_layout_path + .clone() + .unwrap_or(PathBuf::from("default")); + + if layout_path.starts_with("http://") || layout_path.starts_with("https://") { + Some(LayoutInfo::Url(layout_path.display().to_string())) + } else if layout_path.extension().is_some() || layout_path.components().count() > 1 { + let Some(layout_dir) = layout_dir + .as_ref() + .map(|l| l.clone()) + .or_else(default_layout_dir) + else { + return None; + }; + let file_path = layout_dir.join(layout_path); + Some(LayoutInfo::File( + // layout_dir.join(layout_path).display().to_string(), + file_path.display().to_string(), + LayoutMetadata::from(&file_path), + )) + } else { + // Attempt to interpret the layout as bare layout name from the layout application + // directory. This is described in the docs: + // <https://zellij.dev/documentation/layouts.html#layout-default-directory> + if let Some(layout_dir) = layout_dir + .as_ref() + .map(|l| l.clone()) + .or_else(default_layout_dir) + { + let file_path = layout_dir.join(&layout_path); + if file_path.exists() { + return Some(LayoutInfo::File( file_path.display().to_string(), LayoutMetadata::from(&file_path), - )) - } else if layout_path.starts_with("http://") || layout_path.starts_with("https://") - { - Some(LayoutInfo::Url(layout_path.display().to_string())) - } else { - Some(LayoutInfo::BuiltIn(layout_path.display().to_string())) + )); } - }, - None => None, + let file_path_with_ext = file_path.with_extension("kdl"); + if file_path_with_ext.exists() { + return Some(LayoutInfo::File( + file_path_with_ext.display().to_string(), + LayoutMetadata::from(&file_path_with_ext), + )); + } + } + // Assume a builtin layout by default + Some(LayoutInfo::BuiltIn(layout_path.display().to_string())) } } } diff --git a/zellij-utils/src/setup.rs b/zellij-utils/src/setup.rs index 2be6cdef..ac672f5d 100644 --- a/zellij-utils/src/setup.rs +++ b/zellij-utils/src/setup.rs @@ -8,6 +8,7 @@ use crate::{ FEATURES, SYSTEM_DEFAULT_CONFIG_DIR, SYSTEM_DEFAULT_DATA_DIR_PREFIX, VERSION, ZELLIJ_CACHE_DIR, ZELLIJ_DEFAULT_THEMES, ZELLIJ_PROJ_DIR, }, + data::LayoutInfo, errors::prelude::*, home::*, input::{ @@ -368,7 +369,7 @@ impl Setup { /// 3. config options (`config.kdl`) pub fn from_cli_args( cli_args: &CliArgs, - ) -> Result<(Config, Layout, Options, Config, Options), ConfigError> { + ) -> Result<(Config, Option<LayoutInfo>, Options, Config, Options), ConfigError> { // note that this can potentially exit the process Setup::handle_setup_commands(cli_args); let config = Config::try_from(cli_args)?; @@ -384,7 +385,7 @@ impl Setup { let cli_config_options = merge_attach_command_options(cli_config_options, &cli_args); let mut config_without_layout = config.clone(); - let (layout, mut config) = + let (layout_info, mut config) = Setup::parse_layout_and_override_config(cli_config_options.as_ref(), config, cli_args)?; let config_options = @@ -426,7 +427,7 @@ impl Setup { }; Ok(( config, - layout, + layout_info, config_options, config_without_layout, config_options_without_layout, @@ -666,15 +667,16 @@ impl Setup { cli_config_options: Option<&Options>, config: Config, cli_args: &CliArgs, - ) -> Result<(Layout, Config), ConfigError> { + ) -> Result<(Option<LayoutInfo>, Config), ConfigError> { // find the layout folder relative to which we'll look for our layout let layout_dir = cli_config_options .as_ref() .and_then(|cli_options| cli_options.layout_dir.clone()) .or_else(|| config.options.layout_dir.clone()) - .or_else(|| { - get_layout_dir(cli_args.config_dir.clone().or_else(find_default_config_dir)) - }); + .or_else(|| get_layout_dir(cli_args.config_dir.clone())) + .or_else(|| get_layout_dir(find_default_config_dir())) + // Try to get an absolute path, else let the resolution code figure this out. + .map(|d| d.canonicalize().unwrap_or(d)); // the chosen layout can either be a path relative to the layout_dir or a name of one // of our assets, this distinction is made when parsing the layout - TODO: ideally, this // logic should not be split up and all the decisions should happen here @@ -687,6 +689,7 @@ impl Setup { .and_then(|cli_options| cli_options.default_layout.clone()) }) .or_else(|| config.options.default_layout.clone()); + let layout_info = LayoutInfo::from_config(&layout_dir, &chosen_layout); if let Some(layout_url) = chosen_layout .as_ref() .and_then(|l| l.to_str()) @@ -698,11 +701,12 @@ impl Setup { } }) { - Layout::from_url(layout_url, config) + Layout::from_url(layout_url, config).map(|(_layout, config)| (layout_info, config)) } else { // we merge-override the config here because the layout might contain configuration // that needs to take precedence Layout::from_path_or_default(chosen_layout.as_ref(), layout_dir.clone(), config) + .map(|(_layout, config)| (layout_info, config)) } } fn handle_setup_commands(cli_args: &CliArgs) { @@ -744,6 +748,7 @@ fn merge_attach_command_options( mod setup_test { use super::Setup; use crate::cli::{CliArgs, Command}; + use crate::data::LayoutInfo; use crate::input::options::Options; use insta::assert_snapshot; use std::path::PathBuf; @@ -751,9 +756,9 @@ mod setup_test { #[test] fn default_config_with_no_cli_arguments() { let cli_args = CliArgs::default(); - let (config, layout, options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + let (config, layout_info, options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); assert_snapshot!(format!("{:#?}", config)); - assert_snapshot!(format!("{:#?}", layout)); + assert_snapshot!(format!("{:#?}", layout_info)); assert_snapshot!(format!("{:#?}", options)); } #[test] @@ -763,7 +768,7 @@ mod setup_test { simplified_ui: Some(true), ..Default::default() })); - let (_config, _layout, options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + let (_config, _layout_info, options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); assert_snapshot!(format!("{:#?}", options)); } #[test] @@ -773,9 +778,9 @@ mod setup_test { "{}/src/test-fixtures/layout-with-options.kdl", env!("CARGO_MANIFEST_DIR") ))); - let (_config, layout, options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + let (_config, layout_info, options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); assert_snapshot!(format!("{:#?}", options)); - assert_snapshot!(format!("{:#?}", layout)); + assert_snapshot!(format!("{:#?}", layout_info)); } #[test] fn cli_arguments_override_layout_options() { @@ -788,9 +793,9 @@ mod setup_test { pane_frames: Some(true), ..Default::default() })); - let (_config, layout, options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + let (_config, layout_info, options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); assert_snapshot!(format!("{:#?}", options)); - assert_snapshot!(format!("{:#?}", layout)); + assert_snapshot!(format!("{:#?}", layout_info)); } #[test] fn layout_env_vars_override_config_env_vars() { @@ -803,7 +808,7 @@ mod setup_test { "{}/src/test-fixtures/layout-with-env-vars.kdl", env!("CARGO_MANIFEST_DIR") ))); - let (config, _layout, _options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + let (config, _layout_info, _options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); assert_snapshot!(format!("{:#?}", config)); } #[test] @@ -817,7 +822,7 @@ mod setup_test { "{}/src/test-fixtures/layout-with-ui-config.kdl", env!("CARGO_MANIFEST_DIR") ))); - let (config, _layout, _options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + let (config, _layout_info, _options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); assert_snapshot!(format!("{:#?}", config)); } #[test] @@ -831,7 +836,7 @@ mod setup_test { "{}/src/test-fixtures/layout-with-themes-config.kdl", env!("CARGO_MANIFEST_DIR") ))); - let (config, _layout, _options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + let (config, _layout_info, _options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); assert_snapshot!(format!("{:#?}", config)); } #[test] @@ -845,7 +850,49 @@ mod setup_test { "{}/src/test-fixtures/layout-with-keybindings-config.kdl", env!("CARGO_MANIFEST_DIR") ))); - let (config, _layout, _options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + let (config, _layout_info, _options, _, _) = Setup::from_cli_args(&cli_args).unwrap(); assert_snapshot!(format!("{:#?}", config)); } + #[test] + fn cli_config_dir_overrides_defaults() { + let cli_args = CliArgs { + config_dir: Some(PathBuf::from(format!( + "{}/src/test-fixtures/config-dirs/layout-upside-down", + env!("CARGO_MANIFEST_DIR") + ))), + ..Default::default() + }; + let (_, layout_info, _, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + let Some(LayoutInfo::File(layout_path, _)) = layout_info else { + panic!("layout info has unexpected format"); + }; + assert_eq!( + layout_path, + format!( + "{}/src/test-fixtures/config-dirs/layout-upside-down/layouts/upside-down.kdl", + env!("CARGO_MANIFEST_DIR") + ) + ); + } + #[test] + fn cli_config_dir_finds_custom_default() { + let cli_args = CliArgs { + config_dir: Some(PathBuf::from(format!( + "{}/src/test-fixtures/config-dirs/custom-default-layout", + env!("CARGO_MANIFEST_DIR") + ))), + ..Default::default() + }; + let (_, layout_info, _, _, _) = Setup::from_cli_args(&cli_args).unwrap(); + let Some(LayoutInfo::File(layout_path, _)) = layout_info else { + panic!("layout info has unexpected format"); + }; + assert_eq!( + layout_path, + format!( + "{}/src/test-fixtures/config-dirs/custom-default-layout/layouts/default.kdl", + env!("CARGO_MANIFEST_DIR") + ) + ); + } } diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options-2.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options-2.snap index 690ba613..6fd9c06b 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options-2.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options-2.snap @@ -1,32 +1,5 @@ --- source: zellij-utils/src/setup.rs -expression: "format!(\"{:#?}\", layout)" +expression: "format!(\"{:#?}\", layout_info)" --- -Layout { - tabs: [], - focused_tab_index: None, - template: Some( - ( - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - [], - ), - ), - swap_layouts: [], - swap_tiled_layouts: [], - swap_floating_layouts: [], -} +None diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap index 191e8ba4..abe93e42 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap @@ -1,2290 +1,9 @@ --- source: zellij-utils/src/setup.rs -expression: "format!(\"{:#?}\", layout)" +expression: "format!(\"{:#?}\", layout_info)" --- -Layout { - tabs: [], - focused_tab_index: None, - template: Some( - ( - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "tab-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "status-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - [], - ), +Some( + BuiltIn( + "default", ), - swap_layouts: [], - swap_tiled_layouts: [ - ( - { - MaxPanes( - 5, - ): TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "tab-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Vertical, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: Some( - 0, - ), - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "status-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - MaxPanes( - 8, - ): TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "tab-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Vertical, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: Some( - 0, - ), - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "status-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - MaxPanes( - 12, - ): TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "tab-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Vertical, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: Some( - 0, - ), - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "status-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - }, - Some( - "vertical", - ), - ), - ( - { - MaxPanes( - 4, - ): TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "tab-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "status-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - MaxPanes( - 8, - ): TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "tab-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Vertical, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: Some( - 0, - ), - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Vertical, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "status-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - MaxPanes( - 12, - ): TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "tab-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Vertical, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: Some( - 0, - ), - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Vertical, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Vertical, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "status-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - }, - Some( - "horizontal", - ), - ), - ( - { - MinPanes( - 5, - ): TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "tab-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Vertical, - name: None, - children: [ - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: Some( - 0, - ), - children_are_stacked: true, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: Some( - Fixed( - 1, - ), - ), - run: Some( - Plugin( - Alias( - PluginAlias { - name: "status-bar", - configuration: Some( - PluginUserConfiguration( - {}, - ), - ), - initial_cwd: None, - run_plugin: None, - }, - ), - ), - ), - borderless: Some( - true, - ), - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - ], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - }, - Some( - "stacked", - ), - ), - ], - swap_floating_layouts: [ - ( - { - NoConstraint: [], - }, - Some( - "staggered", - ), - ), - ( - { - MaxPanes( - 10, - ): [ - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 90, - ), - ), - width: Some( - Percent( - 90, - ), - ), - x: Some( - Percent( - 5, - ), - ), - y: Some( - Fixed( - 1, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 90, - ), - ), - width: Some( - Percent( - 90, - ), - ), - x: Some( - Percent( - 5, - ), - ), - y: Some( - Fixed( - 2, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 90, - ), - ), - width: Some( - Percent( - 90, - ), - ), - x: Some( - Percent( - 5, - ), - ), - y: Some( - Fixed( - 3, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 90, - ), - ), - width: Some( - Percent( - 90, - ), - ), - x: Some( - Percent( - 5, - ), - ), - y: Some( - Fixed( - 4, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 90, - ), - ), - width: Some( - Percent( - 90, - ), - ), - x: Some( - Percent( - 5, - ), - ), - y: Some( - Fixed( - 5, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 90, - ), - ), - width: Some( - Percent( - 90, - ), - ), - x: Some( - Percent( - 5, - ), - ), - y: Some( - Fixed( - 6, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 90, - ), - ), - width: Some( - Percent( - 90, - ), - ), - x: Some( - Percent( - 5, - ), - ), - y: Some( - Fixed( - 7, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 90, - ), - ), - width: Some( - Percent( - 90, - ), - ), - x: Some( - Percent( - 5, - ), - ), - y: Some( - Fixed( - 8, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 90, - ), - ), - width: Some( - Percent( - 90, - ), - ), - x: Some( - Percent( - 5, - ), - ), - y: Some( - Fixed( - 9, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 90, - ), - ), - width: Some( - Percent( - 90, - ), - ), - x: Some( - Fixed( - 10, - ), - ), - y: Some( - Fixed( - 10, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - ], - }, - Some( - "enlarged", - ), - ), - ( - { - MaxPanes( - 1, - ): [ - FloatingPaneLayout { - name: None, - height: None, - width: None, - x: Some( - Percent( - 50, - ), - ), - y: Some( - Percent( - 50, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - ], - MaxPanes( - 2, - ): [ - FloatingPaneLayout { - name: None, - height: None, - width: Some( - Percent( - 45, - ), - ), - x: Some( - Percent( - 1, - ), - ), - y: Some( - Percent( - 25, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: None, - width: Some( - Percent( - 45, - ), - ), - x: Some( - Percent( - 50, - ), - ), - y: Some( - Percent( - 25, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - ], - MaxPanes( - 3, - ): [ - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 45, - ), - ), - width: Some( - Percent( - 45, - ), - ), - x: None, - y: Some( - Percent( - 55, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: None, - width: Some( - Percent( - 45, - ), - ), - x: Some( - Percent( - 1, - ), - ), - y: Some( - Percent( - 1, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: None, - width: Some( - Percent( - 45, - ), - ), - x: Some( - Percent( - 50, - ), - ), - y: Some( - Percent( - 1, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - ], - MaxPanes( - 4, - ): [ - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 45, - ), - ), - width: Some( - Percent( - 45, - ), - ), - x: Some( - Percent( - 1, - ), - ), - y: Some( - Percent( - 55, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 45, - ), - ), - width: Some( - Percent( - 45, - ), - ), - x: Some( - Percent( - 50, - ), - ), - y: Some( - Percent( - 55, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 45, - ), - ), - width: Some( - Percent( - 45, - ), - ), - x: Some( - Percent( - 1, - ), - ), - y: Some( - Percent( - 1, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - FloatingPaneLayout { - name: None, - height: Some( - Percent( - 45, - ), - ), - width: Some( - Percent( - 45, - ), - ), - x: Some( - Percent( - 50, - ), - ), - y: Some( - Percent( - 1, - ), - ), - pinned: None, - borderless: None, - run: None, - focus: None, - already_running: false, - pane_initial_contents: None, - logical_position: None, - }, - ], - }, - Some( - "spread", - ), - ), - ], -} +) diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options-2.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options-2.snap index 690ba613..6fd9c06b 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options-2.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options-2.snap @@ -1,32 +1,5 @@ --- source: zellij-utils/src/setup.rs -expression: "format!(\"{:#?}\", layout)" +expression: "format!(\"{:#?}\", layout_info)" --- -Layout { - tabs: [], - focused_tab_index: None, - template: Some( - ( - TiledPaneLayout { - children_split_direction: Horizontal, - name: None, - children: [], - split_size: None, - run: None, - borderless: None, - focus: None, - external_children_index: None, - children_are_stacked: false, - is_expanded_in_stack: false, - exclude_from_sync: None, - run_instructions_to_ignore: [], - hide_floating_panes: false, - pane_initial_contents: None, - }, - [], - ), - ), - swap_layouts: [], - swap_tiled_layouts: [], - swap_floating_layouts: [], -} +None diff --git a/zellij-utils/src/test-fixtures/config-dirs/custom-default-layout/layouts/default.kdl b/zellij-utils/src/test-fixtures/config-dirs/custom-default-layout/layouts/default.kdl new file mode 100644 index 00000000..73aa0136 --- /dev/null +++ b/zellij-utils/src/test-fixtures/config-dirs/custom-default-layout/layouts/default.kdl @@ -0,0 +1,13 @@ +layout { + // Double the tab bar, weee! + pane size=1 borderless=true { + plugin location="tab-bar" + } + pane size=1 borderless=true { + plugin location="tab-bar" + } + pane size=1 borderless=true { + plugin location="status-bar" + } + pane +} diff --git a/zellij-utils/src/test-fixtures/config-dirs/layout-upside-down/config.kdl b/zellij-utils/src/test-fixtures/config-dirs/layout-upside-down/config.kdl new file mode 100644 index 00000000..97e38e6e --- /dev/null +++ b/zellij-utils/src/test-fixtures/config-dirs/layout-upside-down/config.kdl @@ -0,0 +1 @@ +default_layout "upside-down" diff --git a/zellij-utils/src/test-fixtures/config-dirs/layout-upside-down/layouts/upside-down.kdl b/zellij-utils/src/test-fixtures/config-dirs/layout-upside-down/layouts/upside-down.kdl new file mode 100644 index 00000000..e682ce83 --- /dev/null +++ b/zellij-utils/src/test-fixtures/config-dirs/layout-upside-down/layouts/upside-down.kdl @@ -0,0 +1,13 @@ +layout { + pane size=2 borderless=true { + plugin location="status-bar" { + classic true + } + } + pane focus=true + pane size=1 borderless=true { + plugin location="tab-bar" { + hide_swap_layout_indication true + } + } +} |
