Hammerspoon Spoon that displays active Time Machine backup progress in the macOS menubar.
The Spoon polls macOS tmutil status and shows a compact two-line menubar item only while a Time Machine backup is running. It displays backup progress and estimated remaining time when available; otherwise it stays hidden.
- Hammerspoon
- macOS with Time Machine and
/usr/bin/tmutilavailable
Copy or symlink this folder to:
~/.hammerspoon/Spoons/TimeMachine.spoon/
Or distribute it as TimeMachine.spoon.zip; after unzipping, double-click the .spoon bundle to install it with Hammerspoon.
In your Hammerspoon init.lua:
hs.loadSpoon("TimeMachine")
spoon.TimeMachine:start()Click the menubar item while a backup is visible to open Time Machine settings.
Configure public properties before calling start():
hs.loadSpoon("TimeMachine")
spoon.TimeMachine.checkInterval = 60 -- seconds between checks when idle
spoon.TimeMachine.fastInterval = 1 -- seconds between checks during backup
spoon.TimeMachine:start()Hotkeys are optional:
spoon.TimeMachine:bindHotkeys({
check = {{"cmd", "alt", "ctrl"}, "t"},
openPreferences = {{"cmd", "alt", "ctrl"}, "b"},
})start()creates a menubar item and schedules periodic checks.- The Spoon runs
/usr/bin/tmutil statusasynchronously viahs.task. - When a backup is running, the menubar shows
Time Machineplus progress/remaining time. - When no backup is running, the menubar item is hidden.
stop()terminates any activetmutiltask, stops timers, and removes the menubar item.
Public API is documented in Hammerspoon docstring format in init.lua and collected in docs.json.
Main methods:
TimeMachine:start()— start periodic Time Machine monitoring.TimeMachine:stop()— stop timers and remove the menubar item.TimeMachine:check()— run one status check immediately.TimeMachine:openPreferences()— open Time Machine settings.TimeMachine:bindHotkeys(mapping)— bind optional hotkeys.
Public properties:
TimeMachine.checkIntervalTimeMachine.fastIntervalTimeMachine.logger
MIT — see https://opensource.org/licenses/MIT.