aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDaniel Jankowski <daniel.jankowski@rub.de>2023-09-20 15:05:33 +0200
committerDaniel Jankowski <daniel.jankowski@rub.de>2023-09-20 15:05:33 +0200
commit724fcbaaab1ea0ab36a67f6c66e520526a15f8b9 (patch)
tree920e262ebb890a191669057d09712b3eb956a6e1 /examples
parentchore: bump version to 0.5.1 (diff)
downloadsl0pstatus-724fcbaaab1ea0ab36a67f6c66e520526a15f8b9.tar.gz
sl0pstatus-724fcbaaab1ea0ab36a67f6c66e520526a15f8b9.tar.xz
sl0pstatus-724fcbaaab1ea0ab36a67f6c66e520526a15f8b9.zip
chore: add example for swapping layouts
Diffstat (limited to 'examples')
-rw-r--r--examples/swap-layouts.kdl69
-rw-r--r--examples/swap-layouts.pngbin0 -> 26986 bytes
2 files changed, 69 insertions, 0 deletions
diff --git a/examples/swap-layouts.kdl b/examples/swap-layouts.kdl
new file mode 100644
index 0000000..e4c3945
--- /dev/null
+++ b/examples/swap-layouts.kdl
@@ -0,0 +1,69 @@
+layout {
+ tab {
+ pane
+ }
+
+ 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=5 {
+ 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; }
+ }
+ }
+ }
+
+ default_tab_template {
+ children
+ pane size=1 borderless=true {
+ plugin location="file:../target/wasm32-wasi/debug/zjstatus.wasm" {
+ format_left "{mode}{tabs}"
+ format_right "#[fg=#83a598,bold]{session} #[fg=#b8bb26,bold]{swap_layout}"
+
+ mode_normal "#[fg=#b8bb26,bold]{name}"
+ mode_locked "#[fg=#fb4934,bold]{name}"
+ mode_resize "#[fg=#fabd2f,bold]{name}"
+ mode_pane "#[fg=#d3869b,bold]{name}"
+ mode_tab "#[fg=#83a598,bold]{name}"
+ mode_scroll "#[fg=#8ec07c,bold]{name}"
+ mode_session "#[fg=#fe8019,bold]{name}"
+ mode_move "#[fg=#a89984,bold]{name}"
+
+ tab_normal "#[fg=#a89984,bold] {name}"
+ tab_active "#[fg=#83a598,bold] {name}"
+ }
+ }
+ }
+}
diff --git a/examples/swap-layouts.png b/examples/swap-layouts.png
new file mode 100644
index 0000000..2ad944f
--- /dev/null
+++ b/examples/swap-layouts.png
Binary files differ