1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-19 02:17:44 +01:00

16 lines
354 B
Plaintext
Raw Normal View History

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
temp=$(sensors | awk '/Package id 0/ {print $4}')
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"