v2.0.0 — Swift
The app is now written in Swift. Same menu, same behaviour, same bundle id — but one
thread, no runtime, about 300 KB instead of 4.5 MB. The Go version stays available on
branch go and as tag v1.6.1.
Why the rewrite: 1.6 had already dropped every dependency, but 40% of what remained
existed only to bridge Go's runtime and AppKit, and every bug fixed in 1.6.1 lived in
that bridge. Swift talks to AppKit directly, so that whole class of problems — a second
mover loop, a menu that stops responding, a race between the wake handler and Stop —
cannot occur any more. A Timer on the main thread drives the engine; there is no
queue, lock or atomic in the app.
Changed
- The "permission" alert no longer re-arms after Stop/Start: one alert per 24 hours,
full stop. - Resume After Wake only checks the idle time on wake. It never restarts a mover you
stopped — which was the intent before, but the old code carried a restart path that
could fire. - The moved-mouse log line no longer carries a second, UTC timestamp.
- The version lives in
Info.plistonly and shows in About and in the startup log.
Measured, for the record
- 1.6.0 on an Intel Mac: 17 s of CPU in 5 days 16 hours; on an M2: 19 s in 4 days. The
"high CPU" report against 1.6.0 reproduces on neither. The startup log line still
names version, architecture and macOS build so a report can be pinned to a build. - A move lands every 60 to 90 seconds, not every 60: the check runs on a 30-second
grid and the move itself resets the idle timer just after a tick. Documented, not
changed; every chat client's away threshold is minutes.
Installing — universal, macOS 13+, ad-hoc signed and not notarised, so clear the
quarantine attribute before the first launch (xattr -cr /Applications/amm.app) or use
System Settings → Privacy & Security → Open Anyway. See the README.
Updating from 1.6 — the Accessibility grant and the login item are tied to the exact
binary. Remove amm from Privacy & Security → Accessibility with the minus button and
add it again, and tick Launch at Login again if you use it. The app tells you on the
first failed move if the grant is stale.
Building from source needs only the Xcode Command Line Tools: make build, make test.