Changed OpenBSD CPU temp retrieval to take into account machines that only expose cpu0.temp0 instead of lm0.temp0
This commit is contained in:
parent
5889f1fe8b
commit
c81e01405e
1 changed files with 3 additions and 2 deletions
5
neofetch
5
neofetch
|
@ -1086,8 +1086,9 @@ get_cpu() {
|
|||
deg="${deg/C}"
|
||||
;;
|
||||
"OpenBSD"* | "Bitrig"*)
|
||||
deg="$(sysctl -n hw.sensors.lm0.temp0)"
|
||||
deg="${deg/ degC}"
|
||||
deg_var="$(sysctl hw.sensors | grep -m1 temp0 | cut -d'=' -f1)"
|
||||
deg="$(sysctl -n $deg_var)"
|
||||
deg="${deg/0 degC}"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue