mirror of
https://codeberg.org/frosty/dotfiles.git
synced 2024-09-19 11:47:09 -04:00
16 lines
205 B
Plaintext
16 lines
205 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
while read -r line; do
|
||
|
case $line in
|
||
|
*Package\ id\ 0:*) temp=$line ;;
|
||
|
esac
|
||
|
done <<EOF
|
||
|
$(sensors)
|
||
|
EOF
|
||
|
|
||
|
temp=${temp#Package id 0:*+}
|
||
|
temp=${temp%%°*}
|
||
|
temp=${temp%.*}
|
||
|
|
||
|
printf '%s°C\n' "$temp"
|