_lp_color_map: rename 'load' to 'value'

This commit is contained in:
Olivier Mengué 2013-05-13 20:46:44 +02:00
parent 43511f6f15
commit ea1c897aef

View File

@ -1127,33 +1127,33 @@ _lp_battery_color()
} }
_lp_color_map() { _lp_color_map() {
local -i load local -i value
load=$1 value=$1
if (( load < 100 )); then if (( value < 100 )); then
if (( load < 60 )); then if (( value < 60 )); then
if (( load < 20 )); then if (( value < 20 )); then
echo -ne "${LP_COLORMAP_0}" echo -ne "${LP_COLORMAP_0}"
elif (( load < 40 )); then elif (( value < 40 )); then
echo -ne "${LP_COLORMAP_1}" echo -ne "${LP_COLORMAP_1}"
else # 40..59 else # 40..59
echo -ne "${LP_COLORMAP_2}" echo -ne "${LP_COLORMAP_2}"
fi fi
elif (( load < 80 )); then elif (( value < 80 )); then
echo -ne "${LP_COLORMAP_3}" echo -ne "${LP_COLORMAP_3}"
else # 80..99 else # 80..99
echo -ne "${LP_COLORMAP_4}" echo -ne "${LP_COLORMAP_4}"
fi fi
elif (( load < 160 )); then elif (( value < 160 )); then
if (( load < 120 )); then if (( value < 120 )); then
echo -ne "${LP_COLORMAP_5}" echo -ne "${LP_COLORMAP_5}"
elif (( load < 140 )); then elif (( value < 140 )); then
echo -ne "${LP_COLORMAP_6}" echo -ne "${LP_COLORMAP_6}"
else else
echo -ne "${LP_COLORMAP_7}" echo -ne "${LP_COLORMAP_7}"
fi fi
elif (( load < 180 )) ; then elif (( value < 180 )) ; then
echo -ne "${LP_COLORMAP_8}" echo -ne "${LP_COLORMAP_8}"
else # (( load >= 180 )) else # (( value >= 180 ))
echo -ne "${LP_COLORMAP_9}" echo -ne "${LP_COLORMAP_9}"
fi fi
} }