Better Resource Monitor now shows storage

PR #101 fills in one missing menu-bar metric: storage.

CPU, memory, GPU, and network were already in the tray. Storage needed one extra constraint: work out usage without crawling anything on disk.

That is all it does. It does not scan directories, read file names or contents, enumerate external drives, or collect per-volume details. It asks the OS for total and available capacity on the filesystem backing $HOME, then shows the percentage used in the menu bar.

How it works

The sampler asks for two numbers: total capacity and available capacity. On macOS, it uses CFURLCopyResourcePropertiesForKeys with the matching capacity keys. Linux uses statvfs. It then calculates (total - available) / total * 100 and clamps the result to 0..100.

No root helper. No analytics. No telemetry. No private API path for App Store builds.

App Store detail

Apple requires a privacy manifest for some accessed API categories. Disk space is one of them, so the PR includes PrivacyInfo.xcprivacy and declares NSPrivacyAccessedAPICategoryDiskSpace with reason 85F4.1.

CI checks that the packaged app contains both the manifest and the disk-space reason before upload.

What changed in the PR

Storage has its own disc icon in the tray renderer and a localized “Show Storage” setting in the menu. Users with saved metric settings keep them, so the new segment is not switched on for them. Fresh installs can show it by default.

The tests cover the bits most likely to break later: percentage math, settings migration, render width, alert behavior, translations, and icon ordering.

When I published this, the change targeted app version 1.1.5 and included Rust and Cloudflare Pages checks.

PR #101 · Source

Published date:

Let's connect

Find me on GitHub, Discord and X