Better Resource Monitor: from disk usage to space left
I added storage to Better Resource Monitor in June with PR #101. CPU, memory, GPU and network were already in the menu bar. Storage showed the percentage of disk space used.
Then gelpenaddict opened issue #180, asking for GB remaining, like eul. That changed what the metric shows and when it warns.
The feedback that changed it
I asked whether the storage warning should keep using a percentage or switch to a fixed amount, such as 10 GB. Their reply made the problem clear: 80% usage on a 1 TB disk still leaves about 200 GB. A percentage warning can look urgent when there is plenty of room.
They preferred configurable alerts, but suggested 10 GB if I kept a fixed threshold. I went with that smaller change. Storage now shows available capacity, with units such as GB or TB, and turns on its warning color below 10 GB when alerts are enabled.
PR #182 implemented the change and merged on August 28. PR #195 updated the documentation to match the new warning. The change shipped in v1.1.9. On September 4, the requester confirmed they could see it after updating.
Reading the number
The low-storage threshold uses decimal GB:
19.5 GB available No storage warning
10.0 GB available No storage warning at exactly 10 GB
9.9 GB available Storage warning, if alerts are enabled
The label also handles rounding near the threshold. If less than 10 GB remains but the formatted value would round to 10.0 GB, it shows <10 GB. The warning still follows the actual byte count.
The PR tests cover those boundaries, label changes and rendering without overlapping the icon. The tray redraws when the visible label or warning state changes.
How it reads storage
The sampler still asks the OS for total and available capacity on the filesystem backing $HOME. On macOS it uses CFURLCopyResourcePropertiesForKeys; the Linux implementation uses statvfs. It does not scan directories, read file names or contents, or enumerate external drives.
The original storage PR also added PrivacyInfo.xcprivacy, declaring the disk-space API category with reason 85F4.1, and checks for it in the packaged app.
The public issue helped me answer the question people were looking at the menu bar to ask: how much space do I have left?