12345678910111213141516171819202122 |
- #!/usr/bin/env sh
- BATTERY_LEVEL=`apm -l`
- # 1 is charging & 0 is discharging
- CHARGING=`apm -a`
- if [ $BATTERY_LEVEL -gt 95 ]
- then
- echo ;
- elif [ $BATTERY_LEVEL -gt 70 ]
- then
- echo ;
- elif [ $BATTERY_LEVEL -gt 45 ]
- then
- echo ;
- elif [ $BATTERY_LEVEL -gt 20 ]
- then
- echo ;
- else
- echo
- fi
|