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.
- 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.
- 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.
Install using Cargo:
cargo install --locked stlayer
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
.
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"'
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
.
- 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.
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.
This project is licensed under the MIT License. See the LICENSE file for details.
- Repository: https://codeberg.org/lig/status-slayer
- Issues: https://codeberg.org/lig/status-slayer/issues