mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
19 lines
298 B
Bash
Executable File
19 lines
298 B
Bash
Executable File
#!/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"
|