From 4598330506de2c6671a2c05f3ce5c05491349fa2 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Sun, 30 Oct 2022 01:11:32 +0300 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=93=A6=20Convert=20zellij=20c?= =?UTF-8?q?onfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-close panes on quit. --- emulation/layout.zellij | 62 +++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/emulation/layout.zellij b/emulation/layout.zellij index 5fe4f4f..8698da6 100644 --- a/emulation/layout.zellij +++ b/emulation/layout.zellij @@ -1,39 +1,23 @@ ---- -template: - direction: Horizontal - parts: - - direction: Vertical - borderless: true - split_size: - Fixed: 1 - run: - plugin: - location: "zellij:tab-bar" - - direction: Vertical - body: true - -tabs: - - direction: Vertical - parts: - - direction: Horizontal - borderless: true - run: - command: - cmd: "bash" - args: ["-c", "bash emulation/qemu_multi_uart.sh"] - - direction: Horizontal - parts: - - direction: Vertical - split_size: - Percent: 30 - run: - command: - cmd: "bash" - args: ["-c", "clear; echo -e \"\\033]0;MiniUart\\007\"; bash /dev/ptmx FIRST=1"] - - direction: Vertical - split_size: - Percent: 70 - run: - command: - cmd: "bash" - args: ["-c", "clear; echo -e \"\\033]0;PL011 Uart\\007\"; bash /dev/ptmx SECOND=1"] +layout { + default_tab_template { + pane size=1 borderless=true { + plugin location="zellij:tab-bar" + } + children + } + tab split_direction="Vertical" { + pane split_direction="Vertical" { + pane command="bash" borderless=true close_on_exit=true { + args "-c" "bash emulation/qemu_multi_uart.sh" + } + pane split_direction="Horizontal" { + pane command="bash" size="30%" close_on_exit=true { + args "-c" "clear; echo -e \"\\033]0;MiniUart\\007\"; bash /dev/ptmx FIRST=1" + } + pane command="bash" size="70%" close_on_exit=true { + args "-c" "clear; echo -e \"\\033]0;PL011 Uart\\007\"; bash /dev/ptmx SECOND=1" + } + } + } + } +}