| Crates.io | batsignal |
| lib.rs | batsignal |
| version | 0.1.0 |
| created_at | 2025-02-15 04:36:48.560359+00 |
| updated_at | 2025-02-15 04:36:48.560359+00 |
| description | Batsignal is a lightweight command-line utility designed for seamless integration with scripts, allowing you to automate actions based on your device's battery status. |
| homepage | |
| repository | https://github.com/MidasVanVeen/batsignal |
| max_upload_size | |
| id | 1556322 |
| size | 20,735 |
Batsignal can be used in shell-scripts to wait for certain battery conditions, or to check current battery conditions. See examples below.
batsignal --wait --state charging && echo "Charger connected!"
batsignal --wait --lt 10 && echo "Battery below 10%!"
batsignal --lt 25 && echo "Battery below 25%!" || echo "Battery okay"
A simple cargo install batsignal should do it.