diff options
| author | Daniel Jankowski <daniel.jankowski@rub.de> | 2023-09-08 08:51:12 +0200 |
|---|---|---|
| committer | Daniel Jankowski <daniel.jankowski@rub.de> | 2023-09-08 08:51:12 +0200 |
| commit | 9f2c00e277e20a4d58dfe1297400a5812cc271bb (patch) | |
| tree | 911a6e7b7484ea0a088b7a51f07ea6666b8e37e5 | |
| parent | feat: add index to tabs widget (diff) | |
| download | sl0pstatus-9f2c00e277e20a4d58dfe1297400a5812cc271bb.tar.gz sl0pstatus-9f2c00e277e20a4d58dfe1297400a5812cc271bb.tar.xz sl0pstatus-9f2c00e277e20a4d58dfe1297400a5812cc271bb.zip | |
chore: add example for tmux style config
| -rw-r--r-- | README.md | 11 | ||||
| -rw-r--r-- | examples/tmux.kdl | 22 | ||||
| -rw-r--r-- | examples/tmux.png | bin | 0 -> 28302 bytes | |||
| -rw-r--r-- | plugin-dev-workspace.kdl | 2 |
4 files changed, 31 insertions, 4 deletions
@@ -14,8 +14,12 @@  <details> - <summary>Demo GIF</summary> - <img src="./assets/demo.gif" alt="Demo GIF of zellij with zjstatus" /> +<summary>Examples</summary> +<b>tmux style</b> +<img src="./examples/tmux.png" alt="tmux style bar" /> +<br> +<b>Demo GIF</b> +<img src="./assets/demo.gif" alt="Demo GIF of zellij with zjstatus" /> </details> ## 🚀 Installation @@ -144,10 +148,11 @@ sequence right before the handle in `format_left` or `format_right`. Print a list of current tabs. The name of the tab can be used with `{name}` in the config. The active tab will default to the normal formatting, if not configured. +With `{index}` the tab position can also be used. ```kdl # formatting for inactive tabs -tab_normal "#[fg=#6C7086] {name} " +tab_normal "#[fg=#6C7086] {index} :: {name} " # formatting for the current active tab tab_active "#[fg=#9399B2,bold,italic] {name} " diff --git a/examples/tmux.kdl b/examples/tmux.kdl new file mode 100644 index 0000000..3924463 --- /dev/null +++ b/examples/tmux.kdl @@ -0,0 +1,22 @@ +layout { + pane split_direction="vertical" { + pane + } + + pane size=1 borderless=true { + plugin location="file:../target/wasm32-wasi/debug/zjstatus.wasm" { + format_left "#[fg=0,bg=10][{session}] {tabs}" + format_right "#[fg=0,bg=10]{datetime}" + format_space "#[bg=10]" + + hide_frame_for_single_pane "true" + + tab_normal "{index}:{name} " + tab_active "{index}:{name}* " + + datetime " {format} " + datetime_format "%H:%M %d-%b-%y" + datetime_timezone "Europe/Berlin" + } + } +} diff --git a/examples/tmux.png b/examples/tmux.png Binary files differnew file mode 100644 index 0000000..a1c91eb --- /dev/null +++ b/examples/tmux.png diff --git a/plugin-dev-workspace.kdl b/plugin-dev-workspace.kdl index b21dc5f..e2e970e 100644 --- a/plugin-dev-workspace.kdl +++ b/plugin-dev-workspace.kdl @@ -1,6 +1,6 @@ layout { pane split_direction="vertical" { - pane command="nvim" + pane } pane size=1 borderless=true { |
