Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Improve glxinfo call, OpenBSD sensors fix (#1494)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
julianaito committed Oct 4, 2020
1 parent 60d0901 commit d8e957c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -2246,8 +2246,7 @@ get_cpu() {
;;
"OpenBSD"* | "Bitrig"*)
deg="$(sysctl hw.sensors | \
awk -F '=| degC' '/lm0.temp|cpu0.temp/ {print $2; exit}')"
deg="${deg/00/0}"
awk -F'=|degC' '/(ksmn|adt|lm|cpu)0.temp0/ {printf("%2.1f", $2); exit}')"
;;
esac
;;
Expand Down Expand Up @@ -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: }"
;;
esac
Expand Down

0 comments on commit d8e957c

Please sign in to comment.