Automatically get notified at set battery level thresholds using a systemd timer.
systemd
- for timer/service,loginctl
, and dbuslibnotify
- fornotify-send
make
- forMakefile
build
sudo make install
Once installed, enable and start the systemd timer:
sudo systemctl enable --now lowbatt.timer
lowbatt
has 3 thresholds for discharging alerts:
low_threshold
- default: 30danger_threshold
- default: 20critical_threshold
- default: 10
These can be checked with the lowbatt get
command.
If you would rather different thresholds for notifications, you can update these config values:
sudo lowbatt set low_threshold 20
sudo lowbatt set danger_threshold 10
sudo lowbatt set critical_threshold 5