Fix CPU Temp. not showing up on Raspberry Pi (#1566)
Added another possible name to the regex for finding cpu temperature. This was tested on a Raspberry Pi 4 running Arch Linux ARM.
This commit is contained in:
parent
b83a48a60f
commit
6f8d365deb
2
neofetch
2
neofetch
|
@ -2103,7 +2103,7 @@ get_cpu() {
|
||||||
|
|
||||||
# Select the right temperature file.
|
# Select the right temperature file.
|
||||||
for temp_dir in /sys/class/hwmon/*; do
|
for temp_dir in /sys/class/hwmon/*; do
|
||||||
[[ "$(< "${temp_dir}/name")" =~ (coretemp|fam15h_power|k10temp) ]] && {
|
[[ "$(< "${temp_dir}/name")" =~ (cpu_thermal|coretemp|fam15h_power|k10temp) ]] && {
|
||||||
temp_dirs=("$temp_dir"/temp*_input)
|
temp_dirs=("$temp_dir"/temp*_input)
|
||||||
temp_dir=${temp_dirs[0]}
|
temp_dir=${temp_dirs[0]}
|
||||||
break
|
break
|
||||||
|
|
Reference in New Issue