A simple cli battery percent notifier in Rust. Useful for wm such as i3.
- "Rust btw."
Clone the respository:
git clone [email protected]:NicolasGB/rusty-battery-notifier.git
Then build the binary with cargo:
cd rusty-battery-notifier
cargo build --release
Finally copy the generated binary to somewhere you want. For example in your i3 config directory.
cp target/release/rusty-battery-notifier ~/.config/i3/battery-notify
The binary accepts 3 different flags, you can display them with the --help
flag.
Flag | Description | Default |
---|---|---|
-f | The first threshold to notify at. (%) | 15 |
-s | The second threshold to notify at. (%) | 5 |
-i | The interval to check the battery at. (minutes) | 5 |
Add the following for your config with your desired values.
exec --no-startup-id ~/.config/i3/battery-notify -f 20 -s 10 -i 3
Use a Nerd Font to view the icons in the alert.
This project is licensed under the MIT license