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/snapshots | |
| 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/snapshots')
3 files changed, 9 insertions, 2344 deletions
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 |
