Display cpu temperature in the status bar of iTerm2
M1 version is avalailable here
Based on osx-cpu-temp
- Install osx-cpu-temp
brew install osx-cpu-temp
- Clone this repository
- Enable Python API in iTerm2. Go to Preferences > General > Magic > Enable Python Api
- Create Folder AutoLaunch
mkdir ~/Library/Application\ Support/iTerm2/Scripts/AutoLaunch
- You’ll need to place the script in ~/Library/Application Support/iTerm2/Scripts/AutoLaunch.
- Then manually launch it or restart the app.
- Then, navigate to Preferences > Profiles > Session. Turn on Status Bar Enabled and select Configure Status Bar. Drag the 🌡x°C component into the bottom section
You can change the unit into Farenheit by editing the
output = check_output(["/usr/local/bin/osx-cpu-temp"])
by
output = check_output(["/usr/local/bin/osx-cpu-temp"],["-F])