show pop-up each minute when battery is 100% charged
Hi all,
How do I show pop-up each minute when battery is 100% charged? Maybe even with some sound... It does show pop-up only once. I can miss it easily. I'd like to know when it is time to unplug charger in time. How do I perform it? Thanks ahead. Ubuntu 14.04.1 LTS |
The battery percentage charge is likely to be found in /sys/class/power_supply/BAT0/capacity.
Popup messages can be created using 'xmessage'. Sounds can be played using 'aplay'. Regular checks can be scheduled using 'cron'. i.e. Write a script that can be run as a cron job. |
Quote:
Tried to do it in python, can someone please comment where is my error ? Code:
Python 3.4.0 (default, Apr 11 2014, 13:05:18) |
My actual bash version:
Code:
#!/bin/sh |
All times are GMT -5. The time now is 08:09 PM. |