Play battery low warning sound when laptop battery is low, and when charger is plugged in.

Home   »   Play battery low warning sound when laptop battery is low, and when charger is plugged in.

Suitable for laptops that don't generate udev events when battery charge level changes 
(but do generate events when unplugged).  

MP3 files **not included** (pick or make your own).  You can also change `sound()` to use a tone as in [this example](https://unix.stackexchange.com/a/572032/199293)

After installing in locations mentioned at the top, run 

```shell
systemctl daemon reload
systemctl enable battery-warning
systemctl start battery-warning

systemctl reload udev
```

Leave a Reply

Your email address will not be published.