From 942b581944e32ad47ad3ffe0dda885885f452b54 Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Thu, 23 Mar 2023 16:24:42 -0500 Subject: [PATCH] Update IDE layout, add IDE mode keybind --- zellij/config.kdl | 6 ++ zellij/layouts/ide.kdl | 127 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 123 insertions(+), 10 deletions(-) diff --git a/zellij/config.kdl b/zellij/config.kdl index 27d08ad..b4f10c2 100644 --- a/zellij/config.kdl +++ b/zellij/config.kdl @@ -63,6 +63,12 @@ keybinds { bind "8" { GoToTab 8; SwitchToMode "Normal"; } bind "9" { GoToTab 9; SwitchToMode "Normal"; } bind "Tab" { ToggleTab; } + bind "i" { + NewTab { + layout "/home/daniel/.config/zellij/layouts/ide.kdl" + } + SwitchToMode "Normal" + } } scroll { bind "Ctrl s" { SwitchToMode "Normal"; } diff --git a/zellij/layouts/ide.kdl b/zellij/layouts/ide.kdl index 4e4e706..fa0d678 100644 --- a/zellij/layouts/ide.kdl +++ b/zellij/layouts/ide.kdl @@ -1,22 +1,129 @@ layout { - tab_template name="ide" { + pane_template name="left-sidebar" split_direction="vertical" { + pane size="14%" borderless=true { + plugin location="zellij:strider" + } + + children + } + + pane_template name="bottom-console" split_direction="vertical" { + children + } + + pane_template name="sidecar" split_direction="horizontal" { + children + } + + tab_template name="compact-bar" { pane size=1 borderless=true { plugin location="zellij:compact-bar" } - pane split_direction="vertical" { - pane size="13%" borderless=true { - plugin location="zellij:strider" - } + children + } - pane name="Editor" focus=true edit="./" + default_tab_template { + pane size=1 borderless=true { + plugin location="zellij:compact-bar" } - pane size="28%" stacked=true { - pane - pane name="Git" command="gitui" + left-sidebar split_direction="vertical" { + children } } - ide + swap_tiled_layout name="ide" { + compact-bar max_panes=2 { + pane + } + + compact-bar exact_panes=3 { + left-sidebar split_direction="vertical" { + pane + } + } + + compact-bar exact_panes=4 { + left-sidebar split_direction="vertical" { + pane + } + + bottom-console size="28%" split_direction="vertical" { + pane + } + } + + compact-bar exact_panes=5 { + left-sidebar split_direction="vertical" { + pane + } + + bottom-console size="28%" split_direction="vertical" { + pane + pane + } + } + + compact-bar exact_panes=6 { + left-sidebar split_direction="vertical" { + pane + } + + bottom-console size="28%" stacked=true { + pane + pane + pane + } + } + + compact-bar exact_panes=7 { + left-sidebar split_direction="vertical" { + pane + sidecar size="24%" split_direction="horizontal" { + pane borderless=true + } + } + + bottom-console size="28%" stacked=true { + pane + pane + pane + } + } + + compact-bar exact_panes=8 { + left-sidebar split_direction="vertical" { + pane + sidecar size="24%" split_direction="horizontal" { + pane borderless=true + pane borderless=true + } + } + + bottom-console size="28%" stacked=true { + pane + pane + pane + } + } + + compact-bar min_panes=9 { + pane split_direction="vertical" { + pane + pane + pane + } + pane split_direction="vertical" { + pane + pane + pane + } + pane split_direction="vertical" { + pane + pane + pane + } + } + } }