Comment 25 for bug 661759

Revision history for this message
mark88z@tiscali.it (mark88z) wrote :

Hello I have an HP G62 B07 SL and persist same problem, but i resolv the problem with the script below.

#!/bin/bash

rima=`cat /proc/acpi/battery/BAT0/state|grep "remaining capacity"|awk '{print $3}'`
full=`cat /proc/acpi/battery/BAT0/info|grep "last full capacity"|awk '{print $4}'`

perc=$((echo scale=4;echo $rima/$full*100)|bc)
notify-send -i /home/marco/Dropbox/icone/Battery.png "Carica batteria "$perc"%"

This Script calculates the % remaing and with notify send show on desktop the result. This script work in charge state and in discharge state.

now i will try to estimate the time remaing,