Unverified Commit d8e957cb authored by Charlène's avatar Charlène Committed by GitHub

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)
parent 60d09016
...@@ -2246,8 +2246,7 @@ get_cpu() { ...@@ -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() { ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment