Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A configurable statusbar plugin for zellij

License

NotificationsYou must be signed in to change notification settings

dj95/zjstatus

Repository files navigation

A configurable and themable statusbar for zellij.

clippy checklatest versionGitHub Wiki



The goal of this statusbar is to provide a highly customizable and extensible statusbar for zellij. Singlemodules can be formatted separately. Due to the widget structure new modules can be created with ease.

As an addition, this repsitory containszjframes which can be used to toggle pane frames based on differentconditions even without loadingzjstatus, e.g. when using the default status bars.

Screenshot of the statusbar

Examples

tmux styletmux style bar
simple stylesimple style bar
slanted styleslanted style bar
example for swapping layouts with zjstatusexample for swapping layouts with zjstatus
compact style (thanks to @segaja)compact style bar
conky status (thanks to @benzwt)conky.confconky status
Demo GIFDemo GIF of zellij with zjstatus

🚀 Installation

Tip

For more detailed instructions, check out thewiki!

Download the latest binary in the github releases. Place it somewhere, zellij is able to access it. Then theplugin can be included by referencing it in a layout file, e.g. the default layout one, or the config file.

In contrast tozjstatus,zjframes should only be used in theload_plugins option of theconfig.kdlfrom zellij, as it should only be loaded in the background. For more details, please follow thedocumentation

You could also refer to the plugin guide from zellij, after downloading the binary:https://zellij.dev/documentation/plugin-loading

Please ensure, that the configuration is correct.

Important

In case you experience any crashes or issues, please in the first step try to clear the cache! ($HOME/.cache/zellij/ for Linux,$HOME/Library/Caches/org.Zellij-Contributors.Zellij/ on macOS)

Sometimes, especially when updating plugins, it might come to caching issues, which can be resolved by clearing it. Please keep inmind, that it will also clear the cache for running sessions and revokes granted permissions for plugins.

❄️ Installation with nix flake

Add this repository to your inputs and then with the following overlay to your packages.Then you are able to install and refer to it withpkgs.zjstatus. When templating theconfig file, you can use${pkgs.zjstatus}/bin/zjstatus.wasm as the path.${pkgs.zjstatus}/bin/zjframes.wasmis also available in case you only want to usezjframes.

inputs={# ...zjstatus={url="github:dj95/zjstatus";};};# define the outputs of this flake - especially the home configurationsoutputs={self,nixpkgs,zjstatus, ...}@inputs:let    inherit(inputs.nixpkgs.lib)attrValues;overlays=withinputs;[# ...(final:prev:{zjstatus=zjstatus.packages.${prev.system}.default;})];

⚙️ Configuration

For configuring, please follow thedocumentation.

🏎️ Quick Start for zjstatus

Place the following configuration in your default layout file, e.g.~/.config/zellij/layouts/default.kdl. Right after starting zellij, it will prompt for permissions, that needs to be granted in order for zjstatus to work. Simply navigate to the pane or click on it and pressy. This must be repeated on updates. For more details on permissions, please visit thewiki.

Important

Downloading zjstatus as file and usingfile:~/path/to/zjstatus.wasm is recommend, even if the quickstart includes the https location.

Important

Using zjstatus involves creating new layouts and overriding the default one. This will lead to swap layouts not working, when they are not configured correctly. Please followthis documentation for getting swap layouts back to work, if you need them.

Important

If you want to hide borders, please remove thehide_frame_for_single_pane option or set it tofalse. Otherwise zjstatus will toggle frame borders even if the are hidden in zellijs config!

layout{default_tab_template{childrenpanesize=1borderless=true{plugin location="https://github.com/dj95/zjstatus/releases/latest/download/zjstatus.wasm"{format_left"{mode} #[fg=#89B4FA,bold]{session}"format_center"{tabs}"format_right"{command_git_branch} {datetime}"format_space""border_enabled"false"border_char"─"border_format"#[fg=#6C7086]{char}"border_position"top"hide_frame_for_single_pane"true"mode_normal"#[bg=blue] "mode_tmux"#[bg=#ffc387] "tab_normal"#[fg=#6C7086] {name} "tab_active"#[fg=#9399B2,bold,italic] {name} "command_git_branch_command"git rev-parse --abbrev-ref HEAD"command_git_branch_format"#[fg=blue] {stdout} "command_git_branch_interval"10"command_git_branch_rendermode"static"datetime"#[fg=#6C7086,bold] {format} "datetime_format"%A, %d %b %Y %H:%M"datetime_timezone"Europe/Berlin"}}}}

🏎️ Quickstart for zjframes

Add the following to theconfig.kdl or add the plugin toload_plugins, if you already load other plugins in the background.Double check if the configuration matches your expectations. Then restart zellij.

Important

Downloading zjframes as file and usingfile:~/path/to/zjframes.wasm is recommend, even if the quickstart includes the https location.

// Plugins to load in the background when a new session startsload_plugins{"https://github.com/dj95/zjstatus/releases/latest/download/zjframes.wasm"{hide_frame_for_single_pane"true"hide_frame_except_for_search"true"hide_frame_except_for_scroll"true"hide_frame_except_for_fullscreen"true"}}

🧱 Widgets

The documentation for the widgets can be found in thewiki.

The following widgets are available:

🚧 Development

Make sure you have rust and thewasm32-wasi target installed. If using nix, you could utilize the nix-shellin this repo for obtainingcargo andrustup. Then you'll only need to add the target withrustup target add wasm32-wasi.

With the toolchain, simply buildzjstatus withcargo build. Then you are able to run the example configurationwithzellij -l plugin-dev-workspace.kdl from the root of the repository.

🤝 Contributing

If you are missing features or find some annoying bugs please feel free to submit an issue or a bugfix within a pull request :)

📝 License

© 2024 Daniel Jankowski

This project is licensed under the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.


[8]ページ先頭

©2009-2025 Movatter.jp