Skip to content

Commit

Permalink
feat: use smctemp instead of osx-cpu-temp to support M1 mac
Browse files Browse the repository at this point in the history
  • Loading branch information
narugit committed Feb 23, 2022
1 parent 045f6d0 commit 444eeac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/temp_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ print_cpu_temp() {
done
# remove leading and trailing whitespace
echo "$temp_string" | awk 'BEGIN{OFS=" "}$1=$1{print $0}'
elif command_exists "osx-cpu-temp"; then
local temp
temp=$(osx-cpu-temp | grep -o "[0-9]*\.[0-9]")
elif command_exists "smctemp"; then
temp=$(smctemp -c)
else
echo "no sensors found"
fi
Expand Down

0 comments on commit 444eeac

Please sign in to comment.