From: Pablo G. C. <ozr...@gm...> - 2009-01-30 13:01:47
|
Battery monitor's alarm doesn't work with eeepc. I'm not an expert but read something about problems with mintes remaining that should be fixed using percentages instead. This little script works great: if ! grep -q on-line /proc/acpi/ac_adapter/AC0/state ; then BAT_DIR=/proc/acpi/battery/BAT0 FULL_BAT=`grep 'last full capacity' ${BAT_DIR}/info | awk '{ print $4 }'` CUR_BAT=`grep 'remaining capacity' ${BAT_DIR}/state | awk '{ print $3 }'` AVG=`expr $(expr ${CUR_BAT} \* 100) / ${FULL_BAT}` if [ "$AVG" -le "20" ]; then echo "Battery warning... "$AVG & fi fi I'll try to guess how to addapt something similar to lxde's battery monitor. -- (^< -- May the source be with you //'\ V_/_ |