summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-01-28 11:20:12 +0100
committerHugues Hiegel <hugues@hiegel.fr>2009-01-28 11:20:12 +0100
commita3df8b7498abdf8711bd05d6d9860b0e76142890 (patch)
treeddde91451ab509ea714242862a6b84c733a6a9d4
parent341536f1014f835f43b38b1028f629fe5b7deae9 (diff)
[PROMPT] battery managment update, AC power and critical status
-rw-r--r--12_Prompts.zsh14
1 files changed, 11 insertions, 3 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh
index 31240e0..74dd172 100644
--- a/12_Prompts.zsh
+++ b/12_Prompts.zsh
@@ -117,7 +117,7 @@ update_prompt()
else
if [ $BATTERYCHARGING -lt 0 ]
then
- if [ $BATTERY_TIME -lt 600 ]
+ if [ $BATTERY_TIME -lt 659 ]
then
BATTERY="$C_$battery_colors[critical]$_C"$BATTERY
else
@@ -126,8 +126,16 @@ update_prompt()
BATTERY="$C_$prompt_colors[bar]$_C"-"$BATTERY"
else
## Battery full
- BATTERY=""
- BATTERYSIZE=0
+ BATTERY=$(grep "^AC Power" /proc/pmu/info | cut -c26)
+ if [ $BATTERY -ne 0 ]
+ then
+ BATTERY="⚡"
+ BATTERY="$C_$prompt_colors[bar]$_C"-"$BATTERY"
+ BATTERYSIZE=2
+ else
+ BATTERY=""
+ BATTERYSIZE=0
+ fi
fi
fi
## Percentage