Status Slayer is a configurable implementation of status command for Sway WM using Swaybar Protocol.
- Rust 100%
| src | ||
| tests | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
Status Slayer
Status Slayer is a configurable implementation of the status command for Sway WM using the Swaybar Protocol. Written in Rust, it provides a fast and highly customizable way to display status information in your Swaybar.
Features
- Flexible Configuration: Configure commands and intervals using a simple TOML format.
- Efficient Updates: Sends updates to Swaybar only when a command's output changes, ensuring minimal latency.
- Custom Intervals: Supports interval-based commands or one-shot execution for static values.
Planned Features
- Configurable click actions for sections.
- Color configuration per section.
- Pango markup support for rich text formatting.
- Built-in modules (e.g.,
hostname,date,memory,cpu,network) that eliminate the need for external commands.
Installation
Install using Cargo:
cargo install --locked stlayer
Usage
Add the following to your Sway configuration file (~/.config/sway/config):
status_command stslayer [--config <path to config>]
Replace <path to config> with the path to your configuration file. Default config path is $XDG_CONFIG_HOME/stslayer/config.toml.
Configuration
Status Slayer uses a TOML-based configuration file. Below is an example:
min_interval = 0.1
[[section]]
name = "kernel name"
command = "uname -s"
interval = "oneshot"
[[section]]
name = "date and time"
command = 'date "+%Y-%m-%d %H:%M:%S"'
Configuration Options
min_interval: Minimal global status update interval in seconds. Updates won't be sent to Sway more often than that (default:0.1).name: A label for the section.command: The shell command to execute for the section.interval: The interval in seconds to execute the command (default:1). Use "oneshot" for commands that run only once.
Minimum value for all intervals is
0.1.
How It Works
- Each command runs at the defined interval, and the last known output is displayed in the status bar.
- Status Slayer sends updates to Swaybar immediately whenever a command's output changes.
Contributing
Contributions are welcome! If you find a bug, have a feature request, or want to contribute code, feel free to:
- Open an issue: https://codeberg.org/lig/status-slayer/issues
- Fork the repository and submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Links
- Repository: https://codeberg.org/lig/status-slayer
- Issues: https://codeberg.org/lig/status-slayer/issues