diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2009-01-29 16:20:06 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2009-01-29 16:20:06 +0100 |
commit | 7baa4f132c9ed864de28c68cf5c4fdfabf4121a1 (patch) | |
tree | e5509564b61ab55af25bfb2ffdf4462ad27f7dac | |
parent | c4e84ff816fc481104620985b608357dcc723b3f (diff) |
[PROMPT] battery charge complete workaround for ibam
-rw-r--r-- | 12_Prompts.zsh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh index 8b7c259..053210c 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -105,13 +105,14 @@ update_prompt() ## Time POWERADAPTER=$(grep "^AC Power" /proc/pmu/info | cut -c26) + ISCHARGING=$(grep "^current" /proc/pmu/battery_0 | cut -c14) BATTERYTIME=$(ibam -r | head -n1 | cut -c30- | cut -d: -f1,2 | tr ':' 'h') BATTERYTMP="-"$BATTERYTIME BATTERYSIZE=${#BATTERYTMP} BATTERYTIMEMIN=$(( $(echo $BATTERYTIME | cut -dh -f1) * 60 + $(echo $BATTERYTIME | cut -dh -f2) )) - if [ $POWERADAPTER -eq 1 -a $BATTERYTIME != "0:00" ] + if [ $POWERADAPTER -eq 1 -a $ISCHARGING -ne 0 ] then BATTERYCOLOR="charging" else |