A small macOS menu bar app that automatically hides the mouse cursor after a configurable period of inactivity, and shows it again as soon as the mouse moves.
macOS has no built-in way to auto-hide an idle cursor system-wide (only certain apps, like video players, hide it in fullscreen). This fills that gap as a lightweight background utility.
- Uses the private/undocumented
CGSSetConnectionPropertywith the key"SetsCursorInBackground"on this process's CGS connection. This letsCGDisplayHideCursor/CGDisplayShowCursorkeep working even while the app isn't the frontmost application (normally these calls only affect the cursor while the calling process is key/frontmost). - A timer polls
CGEventSource.secondsSinceLastEventTypeto measure how long the mouse has been idle, and hides/shows the cursor once it crosses the selected threshold. - Menu bar icon: SF Symbol
cursorarrow.slash.
SetsCursorInBackground is an undocumented CGS (Core Graphics Services)
connection property. It could be removed or changed in a future macOS
release, though it's been stable across many versions historically. If
the app suddenly stops working after a system update, this is the first
place to check.
Requires Xcode Command Line Tools (xcode-select --install).
git clone <this-repo-url>
cd CursorIdleHider
./build_app.sh
mv CursorIdleHider.app /Applications/Runs as a menu bar icon only (no Dock icon, no window). Menu:
- Aktivní — checkbox, toggles the whole feature on/off
- 1 / 2 / 3 / 5 / 10 / 15 / 20 / 30 s — idle threshold before the cursor hides
- Konec — quit
(Menu labels are in Czech, matching the original build this was recovered
from. Feel free to translate — it's a two-line change in main.swift.)
To launch automatically at login: System Settings → General → Login
Items → + → select the app in /Applications.
Public domain / Unlicense — do whatever you want with it. See LICENSE.