dwmblocks/blocks/cpu_temp.sh

13 lines
188 B
Bash
Raw Normal View History

2020-07-06 20:06:10 +00:00
#!/bin/dash
crit=70
read -r temp </sys/class/thermal/thermal_zone0/temp
temp=${temp%???}
if [ "$temp" -ge "$crit" ] ; then
echo "${temp}°C"
else
echo "${temp}°C"
fi