#!/bin/sh

t=$(cat /sys/class/thermal/thermal_zone0/temp 2>/dev/null)
[ -n "$t" ] || exit 0

temp=$((t / 1000))

if [ "$temp" -ge 85 ]; then
    color="#c7162b"
elif [ "$temp" -ge 70 ]; then
    color="#e95420"
else
    color="#d0d0d0"
fi

echo "CPU ${temp}°C"
echo "CPU ${temp}°C"
echo "$color"
