mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 09:08:38 +00:00
Changed OpenBSD CPU temp retrieval to take into account machines that only expose cpu0.temp0 instead of lm0.temp0
This commit is contained in:
5
neofetch
5
neofetch
@@ -1086,8 +1086,9 @@ get_cpu() {
|
|||||||
deg="${deg/C}"
|
deg="${deg/C}"
|
||||||
;;
|
;;
|
||||||
"OpenBSD"* | "Bitrig"*)
|
"OpenBSD"* | "Bitrig"*)
|
||||||
deg="$(sysctl -n hw.sensors.lm0.temp0)"
|
deg_var="$(sysctl hw.sensors | grep -m1 temp0 | cut -d'=' -f1)"
|
||||||
deg="${deg/ degC}"
|
deg="$(sysctl -n $deg_var)"
|
||||||
|
deg="${deg/0 degC}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user