← Back to projects

macOS · native

hmon

A menu bar monitor for Apple Silicon. Temperature, CPU, memory, disk, network and battery — 35 sensors, sampled every two seconds, in a popover that stays out of the way until you ask for it.

Swift 5.9 SwiftUI AppKit IOKit ServiceManagement macOS 13+

Install and run

zsh
$ git clone https://github.com/MilanDroid/hmon.git
$ cd hmon && make install
# release build, ad-hoc signed .app, copied to ~/Applications and launched

Needs macOS 13 or later and the Swift 5.9 toolchain from the Xcode 15 Command Line Tools. There is no dock icon — look to the right side of the menu bar. Free and MIT licensed.

Reading sensors Apple does not publish

Thermal data on Apple Silicon is not part of any public API.

Apple Silicon thermal sensors are exposed through the private IOHIDEventSystemClient interface. There is no header for it and no supported entry point, so hmon resolves the symbols at runtime and matches on temperature event services directly.

Everything else comes from documented ground: IOKit for battery and disk, host statistics for CPU and memory, and interface counters differenced across samples for network throughput.

How a reading reaches the menu bar

Sensor sources feeding a sampler, a model and the SwiftUI popover IOHIDEventSystemClient private · temperature IOKit battery · disk host statistics CPU · memory interface counters network, differenced DispatchSourceTimer every 2.0s · own queue StatsModel rolling 5m series status item the always-on strip PopoverView SwiftUI + sparklines

Sampling runs on its own queue so a slow sensor read never stutters the UI.

What each section shows

Temperature

CPU, GPU and battery in °C, each with its own bar, over a shared 5-minute sparkline.

CPU

Total load with a per-core breakdown behind a disclosure, plus a 5-minute trace.

Memory

Used against total, as a percentage and as a series.

Disk

Used and free, with the percentage the Finder does not put in front of you.

Network

Down and up in KB/s, differenced from interface counters between samples.

Battery

Health as macOS reports it, with the raw numbers behind that figure: cycles, design capacity, voltage, current draw.

Battery health, shown honestly. The headline percentage is what macOS reports, and it is labelled as such. Underneath, hmon shows the raw ratio it was derived from — full charge against design capacity — because those two numbers frequently disagree, and only one of them is measured.

The interface

Click the menu bar item for the popover. The switch on each section header decides what the menu bar shows; the popover itself always shows everything.

The hmon popover open under its menu bar item: CPU and GPU temperature, CPU load, memory, disk, network and battery health
The popover, open under its menu bar item.
The All sensors list expanded: PMU die, calibration and device probes with their temperatures, each badged C for CPU or G for GPU
All sensors, each badged C or G by silicon family.

The menu bar strip

Rendered here rather than screenshotted, since it is only ever a line of text.

menu bar — always visible
🌡 54.6° 46.6°  28%  19.7G  248G  BAT 88%  ↓217.0K ↑25.5K

Sources

Sensors.swiftRuntime symbol resolution for the private HID event system; temperature services matched and read as floats.
SystemStats.swiftCPU, memory, disk and network counters from documented interfaces.
Battery.swiftHealth, cycles, capacity, voltage and current draw, kept separate because the arithmetic behind "health" deserves its own file.
StatsModel.swiftThe 2-second timer, the rolling 5-minute series, and the deltas that turn counters into rates.
PopoverView.swiftSwiftUI popover, sections and the sparkline drawing.
DesktopWidget.swiftThe desktop-level presentation.
LaunchAtLogin.swiftServiceManagement registration behind the toggle.
AppDelegate.swiftStatus item ownership and anchoring the popover to it.
hmon — built by MilanDroid All projects