From e0177709bd88032f2752d17d546ee92c87020d76 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 21 Apr 2024 14:52:24 -0500 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 8b66696a..ac60db08 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -300,6 +300,17 @@ CHECKTEMP(){ reading="${lclr}${lmd}${spct}${temp_f}${GAUGESH}" echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading}" + if [ -f ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old ]; then + if [ $(bc -l <<< "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1) < ${temp_f}") -eq 1 ]; then + reading="${reading} ${idsCL[LightRed]}\u2B06 " + elif [ $(bc -l <<< "${temp_f} < $(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)") -eq 1 ]; then + reading="${reading} ${idsCL[LightGreen]}\u2B07 " + elif [ "${temp_f}" == "$(cat ${PW_TMPFOLDER}/.lastinsert/${SENSOR}-${sensorname// /_}.old | cut -d'~' -f 1)" ]; then + reading="${reading} ${idsCL[LightCyan]}${idsST[Bold]}~${idsST[Reset]} " + else + reading="${reading} " + fi + fi if [ "${avgdays}" != "noavg" ]; then echo -en " / ${idsCL[Yellow]}Calculating ${avgdays_disp} average ... " average=$(AVERAGETEMP ${SENSOR} ${avgdays} ${sensorname// /_}) @@ -318,7 +329,7 @@ CHECKTEMP(){ fi if [ "${average}" != "" ] || [ "${temp_f}" != "" ]; then - [ "${average}" != "" ] && fws=11 || fws=21 + [ "${average}" != "" ] && fws=8 || fws=18 [ ${#temp_warn} == 2 ] && spcw=' ' || spcw=' ' [ ${#temp_crit} == 2 ] && spcc=' ' || spcc=' ' if [ "${TTYPE}" == "fans" ]; then