Skip to content

Commit

Permalink
Merge pull request #10 from narugit/feature/support_m1_mac
Browse files Browse the repository at this point in the history
Support mac with Apple Sillicon (M1 chip)
  • Loading branch information
kolach committed Feb 25, 2022
2 parents 045f6d0 + 29d8800 commit 009bd2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
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

0 comments on commit 009bd2b

Please sign in to comment.