neofetch: Fix CPU temp on some systems
This commit is contained in:
parent
7fdaed2f94
commit
0636706ecf
1 changed files with 5 additions and 2 deletions
7
neofetch
7
neofetch
|
@ -1993,8 +1993,11 @@ 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")" =~ (coretemp|fam15h_power|k10temp) ]] && {
|
||||||
{ temp_dir=$temp_dir/temp1_input; break; }
|
temp_dirs=("$temp_dir"/temp*_input)
|
||||||
|
temp_dir=${temp_dirs[0]}
|
||||||
|
break
|
||||||
|
}
|
||||||
done
|
done
|
||||||
|
|
||||||
# Get CPU speed.
|
# Get CPU speed.
|
||||||
|
|
Loading…
Reference in a new issue