diff --git a/powerwall.sh b/powerwall.sh index eb81eeaf..99774071 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -20,12 +20,12 @@ CHECKTEMP(){ if [ "${1}" != "" ]; then reading=$(CHECKTEMPSENSOR ${1}) c=0; spc=''; spc1=`expr ${cw} - ${#1}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - echo "${1}${spc}: ${reading}" + echo -e "${idsCL[LightCyan]}${1}${spc}${idsCL[Default]}: ${reading}" else for SENSOR in ${!SENSOR_ID[@]}; do reading=$(CHECKTEMPSENSOR ${SENSOR}) c=0; spc=''; spc1=`expr ${cw} - ${#SENSOR}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - echo "${SENSOR}${spc}: ${reading}" + echo -e "${idsCL[LightCyan]}${SENSOR}${spc}${idsCL[Default]}: ${reading}" done fi echo @@ -42,11 +42,11 @@ CHECKTEMPSENSOR(){ echo ${TEMP_THRESHOLDS[${1}]} | cut -d',' -f 2 | read temp_crit if [ $(bc -l <<< "$temp_f >= $temp_warn") -eq 1 ] && [ $(bc -l <<< "$temp_f < $temp_crit") -eq 1 ]; then - echo "WARNING: $temp_f°F" + echo -e "${idsCL[LightMagenta]}WARNING: $temp_f°F${idsCL[Default]}" elif [ $(bc -l <<< "$temp_f >= $temp_crit") -eq 1 ]; then - echo "CRITICAL: $temp_f°F" + echo -e "${idsCL[Red]}CRITICAL: $temp_f°F${idsCL[Default]}" else - echo "normal: $temp_f°F" + echo -e "${idsCL[Green]}normal: $temp_f°F${idsCL[Default]}" fi fi }