dwmblocks/blocks/cpu_temp.sh

13 lines
186 B
Bash
Raw Normal View History

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