Improve glxinfo call, OpenBSD sensors fix (#1494)
* Use `glxinfo -B' instead of `glxinfo' It's enough to get the gpu infos and it's way faster. * OpenBSD: fix cpu sensors informations, add ksmn(4) and adt(4)
This commit is contained in:
parent
60d090164d
commit
d8e957cb0d
5
neofetch
5
neofetch
|
@ -2246,8 +2246,7 @@ get_cpu() {
|
||||||
;;
|
;;
|
||||||
"OpenBSD"* | "Bitrig"*)
|
"OpenBSD"* | "Bitrig"*)
|
||||||
deg="$(sysctl hw.sensors | \
|
deg="$(sysctl hw.sensors | \
|
||||||
awk -F '=| degC' '/lm0.temp|cpu0.temp/ {print $2; exit}')"
|
awk -F'=|degC' '/(ksmn|adt|lm|cpu)0.temp0/ {printf("%2.1f", $2); exit}')"
|
||||||
deg="${deg/00/0}"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
@ -2529,7 +2528,7 @@ get_gpu() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
gpu="$(glxinfo | grep -F 'OpenGL renderer string')"
|
gpu="$(glxinfo -B | grep -F 'OpenGL renderer string')"
|
||||||
gpu="${gpu/OpenGL renderer string: }"
|
gpu="${gpu/OpenGL renderer string: }"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Reference in New Issue