[BRLTTY] Low battery alert

Sebastian Humenda shumenda at gmx.de
Tue Jan 17 15:38:22 EST 2017


Hi Shérab

Shérab schrieb am 13.01.2017, 13:38 +0100:
>Has someone successfully set-up a low battery alert system that does not
>depend on a graphical desktop, please?
Yes, I do have written a script on my own. It's executed with cron, the crontab
looks like this:

* * * * * python3 /home/user/bin/akkuleer.py

The akkuleer.py (batter empty) is attached. It basically requires python3, aplay
and a file ~/.sounds/battery_low.wav.

Additional plus for this script is, that it can cope both with laptops with one
or two batteries (the newer Thinkpad have two).

HTH
Sebastian
-- 
Web: http://www.crustulus.de (English|Deutsch)  | Blog: http://www.crustulus.de/blog
FreeDict: Free multilingual dictionaries - http://www.freedict.org
Freies Latein-Deutsch-Wörterbuch: http://www.crustulus.de/freedict.de.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: akkuleer.py
Type: text/x-python
Size: 896 bytes
Desc: not available
URL: <http://brltty.com/pipermail/brltty/attachments/20170117/76b63710/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://brltty.com/pipermail/brltty/attachments/20170117/76b63710/attachment.sig>


More information about the BRLTTY mailing list