Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mac with Apple Sillicon (M1 chip) #10

Merged
merged 2 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ Should be compatible with other RPi distros with `vcgencmd` available.

### On macOS

This plugin uses [lavoiesl/osx-cpu-temp](https://github.com/lavoiesl/osx-cpu-temp).
This plugin uses [narugit/smctemp](https://github.com/narugit/smctemp).

```console
$ git clone https://github.com/lavoiesl/osx-cpu-temp /tmp/osx-cpu-temp
$ (cd /tmp/osx-cpu-temp && make && sudo make install)
$ rm -rf /tmp/osx-cpu-temp
$ git clone https://github.com/narugit/smctemp
$ cd smctemp
$ sudo make install
```

## Installation
Expand Down
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