2019-09-07 17:42:18 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-10-22 23:15:30 +02:00
|
|
|
model=$(cat /proc/cpuinfo | grep "model name" | head -n1)
|
|
|
|
|
2023-10-22 23:30:29 +02:00
|
|
|
icon="^b#282828^^c#dfdfdf^ ^d^"
|
2023-10-22 23:15:30 +02:00
|
|
|
|
|
|
|
if printf "$model " | grep -Fqe "AMD"; then
|
2023-10-17 05:18:46 +02:00
|
|
|
temp=$(sensors | awk '/Tctl/ {print $2}')
|
2023-10-22 23:15:30 +02:00
|
|
|
else
|
2023-10-17 05:25:40 +02:00
|
|
|
temp=$(sensors | awk '/Package id 0/ {print $4}')
|
2023-10-14 02:50:21 +02:00
|
|
|
fi
|
2023-10-17 05:18:46 +02:00
|
|
|
|
|
|
|
temp=$(printf %3s $(echo ${temp##*+} | sed "s/\..*//") | tr ' ' ' ')
|
2023-10-22 23:15:30 +02:00
|
|
|
|
2023-10-22 23:30:29 +02:00
|
|
|
echo "$icon $temp°C"
|