aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/assets/layouts
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2021-07-09 23:37:36 +0200
committera-kenji <aks.kenji@protonmail.com>2021-07-23 17:13:35 +0200
commit5ede25dc37ceb192032524ac9200bb1ca95e5863 (patch)
tree1b2a19f3110ca12ec8705dcb0c07502746c06ff5 /zellij-utils/assets/layouts
parentFix formating of markdown (diff)
downloadsl0ppij-5ede25dc37ceb192032524ac9200bb1ca95e5863.tar.gz
sl0ppij-5ede25dc37ceb192032524ac9200bb1ca95e5863.tar.xz
sl0ppij-5ede25dc37ceb192032524ac9200bb1ca95e5863.zip
Add `tabs` to `layouts`
fixes #603, fixes #349 * The layout has now a unique `tabs` section, that can be used, like the `parts` section, everything that is not inside the tabs section is assumed to be present on every single tab that is opened. This is a BREAKING CHANGE for people that use custom `layouts` already, since the `tabs` section is not optional - for clarity and intentionality reasons. The functionality to specify multiple tabs is already there, but is still gated behind a panic, until #621 is fixed. So for now one tab can be specified to load on startup. * The `NewTab` action can optionally be bound to open a layout that is assumed to be in the new `tabs` section This is a BREAKING CHANGE for people that have the `NewTab` action already bound in the config file: ``` - action: [NewTab, ] key: [F: 5,] ``` must now be specified as: ``` - action: [NewTab: ,] key: [F: 5,] ``` Optionally a layout that should be opened on the new tab can be specified: ``` - action: [NewTab: { direction: Vertical, parts: [ {direction: Horizontal, split_size: {Percent: 50}}, {direction: Horizontal, run: {command: {cmd: "htop"}}},], key: [F: 6,] ``` or: ``` - action: [NewTab: {direction: Vertical, run: {command: {cmd: "htop"} }},] key: [F: 7,] ``` or ``` - action: [NewTab: { direction: Vertical, parts: [ {direction: Vertical, split_size: {Percent: 25},run: {plugin: "strider" }}, {direction: Horizontal}],}, MoveFocus: Left,] key: [F: 8,] ```
Diffstat (limited to 'zellij-utils/assets/layouts')
-rw-r--r--zellij-utils/assets/layouts/default.yaml2
-rw-r--r--zellij-utils/assets/layouts/disable-status-bar.yaml2
-rw-r--r--zellij-utils/assets/layouts/strider.yaml16
3 files changed, 13 insertions, 7 deletions
diff --git a/zellij-utils/assets/layouts/default.yaml b/zellij-utils/assets/layouts/default.yaml
index 96bf1809..39dbdc1b 100644
--- a/zellij-utils/assets/layouts/default.yaml
+++ b/zellij-utils/assets/layouts/default.yaml
@@ -7,6 +7,8 @@ parts:
run:
plugin: tab-bar
- direction: Vertical
+ tabs:
+ - direction: Vertical
- direction: Vertical
split_size:
Fixed: 2
diff --git a/zellij-utils/assets/layouts/disable-status-bar.yaml b/zellij-utils/assets/layouts/disable-status-bar.yaml
index b990ba50..a0a59239 100644
--- a/zellij-utils/assets/layouts/disable-status-bar.yaml
+++ b/zellij-utils/assets/layouts/disable-status-bar.yaml
@@ -7,3 +7,5 @@ parts:
run:
plugin: tab-bar
- direction: Vertical
+ tabs:
+ - direction: Vertical
diff --git a/zellij-utils/assets/layouts/strider.yaml b/zellij-utils/assets/layouts/strider.yaml
index 9bbe5772..a39f327c 100644
--- a/zellij-utils/assets/layouts/strider.yaml
+++ b/zellij-utils/assets/layouts/strider.yaml
@@ -7,13 +7,15 @@ parts:
run:
plugin: tab-bar
- direction: Vertical
- parts:
- - direction: Horizontal
- split_size:
- Percent: 20
- run:
- plugin: strider
- - direction: Horizontal
+ tabs:
+ - direction: Vertical
+ parts:
+ - direction: Horizontal
+ split_size:
+ Percent: 20
+ run:
+ plugin: strider
+ - direction: Horizontal
- direction: Vertical
split_size:
Fixed: 2