BATTERY_DEVICE=$(hal-find-by-property --key info.category --string battery | head -n 1)
if test -z "${BATTERY_DEVICE}" ; then
BATTERY=0
else
BATTERY=$(hal-get-property --udi ${BATTERY_DEVICE} --key battery.charge_level.percentage)
fi
echo " ${BATTERY}% "
Nenhum comentário:
Postar um comentário