2020-07-18 12:00:48 +00:00
|
|
|
#!/bin/sh
|
2020-07-06 20:06:10 +00:00
|
|
|
|
2020-12-27 15:28:23 +00:00
|
|
|
ICONn="\x0c\x0b" # icon for normal temperatures
|
|
|
|
ICONc="\x0d\x0b" # icon for critical temperatures
|
2020-11-23 06:12:13 +00:00
|
|
|
|
|
|
|
crit=70 # critical temperature
|
2020-07-06 20:06:10 +00:00
|
|
|
|
|
|
|
read -r temp </sys/class/thermal/thermal_zone0/temp
|
|
|
|
temp=${temp%???}
|
|
|
|
|
2020-12-27 15:28:23 +00:00
|
|
|
if [ "$temp" -lt "$crit" ] ; then
|
|
|
|
printf "$ICONn%s°C" "$temp"
|
2020-07-06 20:06:10 +00:00
|
|
|
else
|
2020-12-27 15:28:23 +00:00
|
|
|
printf "$ICONc%s°C" "$temp"
|
2020-07-06 20:06:10 +00:00
|
|
|
fi
|