A tiny RAM gauge for your macOS menu bar. One Swift file, zero dependencies, basically zero footprint.
┌──────────────────────────────┐
│ … 🔋 📶 ▐▓▓░▌ 46% Wed 21:24 │ ← that's RAMBar
└──────────────────────────────┘
Activity Monitor is a whole app. iStat Menus is $12. htop needs a terminal. Sometimes you just want to glance at the top of your screen and know if Chrome has eaten your machine yet.
RAMBar is ~150 lines of Swift that does exactly one thing: shows how much memory is in use, and turns angry colors when things get spicy.
- A tiny fill gauge + percentage in the menu bar — adapts to light/dark mode
- Color thresholds — calm by default, 🟠 orange at ≥70%, 🔴 red at ≥85%
- Click for the breakdown — App Memory, Wired, Compressed, and Swap, fetched fresh the moment you open the menu
- The same math as Activity Monitor — "Memory Used" = app + wired + compressed, read straight from the Mach kernel (
host_statistics64), not parsed from some CLI output
Almost nothing, on purpose:
- Wakes up every 30 seconds with a 10s tolerance, so macOS batches it with other timers (better battery)
- Skips redrawing entirely when the percentage hasn't changed — most ticks are a single syscall and a nap
- No Dock icon, no windows, no network, no config files, no framework beyond AppKit
- Compiles to a single small binary
git clone https://github.com/currylaksa/ramusagebar.git
cd ramusagebar
bash install.shThat's it. The script compiles RAMBar.swift, wraps it in a proper .app
bundle at ~/Applications/RAMBar.app, and registers a LaunchAgent so it starts
automatically at every login.
Requires macOS 12+ and Xcode Command Line Tools (xcode-select --install if
swiftc isn't found).
launchctl unload ~/Library/LaunchAgents/com.wilderfarer.rambar.plist
rm -rf ~/Applications/RAMBar.app ~/Library/LaunchAgents/com.wilderfarer.rambar.plistGone without a trace.
The entire app is RAMBar.swift:
host_statistics64asks the Mach kernel for VM stats- Used memory = (internal − purgeable) + wired + compressor pages — the same formula Activity Monitor uses for "Memory Used"
- Swap comes from
sysctl vm.swapusage - An
NSStatusItemdraws a little rounded-rect gauge and the percentage - A 30-second
Timerrepeats forever; the dropdown numbers are only computed when you actually open the menu
No Electron. No menu bar app framework. No 200MB of node_modules to display one number.
MIT — do whatever you want with it.