I am trying to come out with a small python script to monitor the battery state of my ubuntu laptop and sound alerts if it's not charging as well as do other stuff (such as suspend etc). I really don't know where to start, and would like to know if there is any library for python i can use. Any help would be greatly appreciated. Thanks
I believe you can find the information you are looking for in
/sys/class/power_supply/BAT0
Here I found a solution that might be helpful for you too. http://mantoshkumar1.blogspot.in/2012/11/monitoring-battery-status-on-linux.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With