Suitable for laptops that don't generate udev events when battery charge level changes (but do generate events when unplugged).
Uses MP3 files (use mine or make your own).
You can also change sound()
to use a tone as in this example
- Copy MP3 files to
/usr/local/bin
(or change the shell script) - Copy other files to the location specified at the top (change "CHANGE_TO_MY_USER" to the username you primarily use)