// ~/.config/sl0ppij/layouts/default.swap.kdl // Zellij's stock swap layouts, restored. // // Defining layouts/default.kdl overrides the built-in default layout, which // silently takes the built-in swap layouts with it and leaves Alt-[ / Alt-] // doing nothing. This file is `zellij setup --dump-swap-layout default` with // the hardcoded `ui` tab_template stripped, so each swap layout inherits the // zjstatus `default_tab_template` from default.kdl instead of re-adding // zellij's own tab-bar/status-bar. // // Regenerate with: // zellij setup --dump-swap-layout default // then delete the `tab_template name="ui"` block and s/^ui /tab /. swap_tiled_layout name="vertical" { tab max_panes=5 { pane split_direction="vertical" { pane pane { children; } } } tab max_panes=8 { pane split_direction="vertical" { pane { children; } pane { pane; pane; pane; pane; } } } tab max_panes=12 { pane split_direction="vertical" { pane { children; } pane { pane; pane; pane; pane; } pane { pane; pane; pane; pane; } } } } swap_tiled_layout name="horizontal" { tab max_panes=4 { pane pane } tab max_panes=8 { pane { pane split_direction="vertical" { children; } pane split_direction="vertical" { pane; pane; pane; pane; } } } tab max_panes=12 { pane { pane split_direction="vertical" { children; } pane split_direction="vertical" { pane; pane; pane; pane; } pane split_direction="vertical" { pane; pane; pane; pane; } } } } // min_panes lowered 4 -> 2 for the responsive-layout collapse: the switch finds // this layout by name, but still has to satisfy this constraint, so at 4 a // narrow 2- or 3-pane tab would silently refuse to collapse. swap_tiled_layout name="stacked" { mobile min_panes=2 { pane stacked=true { children; } } } swap_tiled_layout name="half-stacked" { tab min_panes=5 { pane split_direction="vertical" { pane pane stacked=true { children; } } } } swap_floating_layout name="staggered" { floating_panes } swap_floating_layout name="enlarged" { floating_panes max_panes=10 { pane { x "5%"; y 1; width "90%"; height "90%"; } pane { x "5%"; y 2; width "90%"; height "90%"; } pane { x "5%"; y 3; width "90%"; height "90%"; } pane { x "5%"; y 4; width "90%"; height "90%"; } pane { x "5%"; y 5; width "90%"; height "90%"; } pane { x "5%"; y 6; width "90%"; height "90%"; } pane { x "5%"; y 7; width "90%"; height "90%"; } pane { x "5%"; y 8; width "90%"; height "90%"; } pane { x "5%"; y 9; width "90%"; height "90%"; } pane { x 10; y 10; width "90%"; height "90%"; } } } swap_floating_layout name="spread" { floating_panes max_panes=1 { pane {y "50%"; x "50%"; } } floating_panes max_panes=2 { pane { x "1%"; y "25%"; width "45%"; } pane { x "50%"; y "25%"; width "45%"; } } floating_panes max_panes=3 { pane { y "55%"; width "45%"; height "45%"; } pane { x "1%"; y "1%"; width "45%"; } pane { x "50%"; y "1%"; width "45%"; } } floating_panes max_panes=4 { pane { x "1%"; y "55%"; width "45%"; height "45%"; } pane { x "50%"; y "55%"; width "45%"; height "45%"; } pane { x "1%"; y "1%"; width "45%"; height "45%"; } pane { x "50%"; y "1%"; width "45%"; height "45%"; } } } // sl0p fork: the collapsed ("mobile") tab template. // // Same bar, one row instead of three: `sl0pbar` is the pane_template from // default.kdl, and zellij parses both files with the SAME parser, so the whole // zjstatus configuration is reused here rather than duplicated. At one row the // plugin skips its frame and renders the single line it always used to -- on a // terminal narrow enough to collapse the layout, two rows of border are two // rows of content. // // Reached automatically by `responsive_layout "stacked"` in config.kdl, which // switches to the swap layout of that name below `responsive_min_cols`. tab_template name="mobile" { children sl0pbar size=1 } // sl0p fork: `arrangement` builds a tree for N panes, instead of the default // "every extra pane becomes a flat sibling". swap_tiled_layout name="grid" { tab min_panes=3 { pane arrangement="grid" { children } } } swap_tiled_layout name="master-stack" { tab min_panes=2 { pane arrangement="master-stack" { children } } }