I built a free Mac app that hides Desktop icons by flipping one bit
Description and use
Bare hides only screenshots on macOS Desktop by toggling the UF_HIDDEN flag and provides a global hotkey for quick visibility toggling.
Problem
Hide Desktop icons on macOS without paying for paid apps and without moving files.
Outcome
Bare hides only screenshots on the Desktop by flipping the UF_HIDDEN flag, allowing quick toggle via a global hotkey, and automatically hides new screenshots as they appear.
Workflow
- 1. Scan ~/Desktop for items
- 2. Classify items by type (aliases, apps, folders, screenshots, others)
- 3. For each item, if it matches hide criteria, set UF_HIDDEN flag via lstat/lchflags
- 4. Track hidden items by name to allow selective unhide
- 5. Use a DispatchSource to watch for new screenshots and hide them automatically
- 6. Provide a global hotkey (⌃⌥⌘H) via RegisterEventHotKey to toggle visibility
- 7. For disk icons, toggle Finder preference ShowHardDrivesOnDesktop and relaunch Finder
Evidence
I wanted to hide the icons on my Mac Desktop. That was the whole requirement.
Bare: a small menu bar app with one job. Click the eye, the Desktop is clean. Click again, everything is back.
macOS already has a "hidden" flag on the filesystem: UF_HIDDEN, the same one chflags hidden sets.
If you'd already hidden some files yourself, a simple "unhide everything" would reveal them. So Bare keeps a set of the names it hid.
The edge case I haven't solved: Tracking by name means that if you rename a file while it's hidden, it leaves the set, and "Show" won't bring it back.
A DispatchSource file-system object watches ~/Desktop. Saving a file can fire several events, so the rescan is debounced by 0.4 seconds.
Most global-hotkey code asks for Accessibility access. Carbon's RegisterEventHotKey doesn't need it, and it's still the simplest way to do one global shortcut on macOS.
- Record date: 2026-10-17T03:56:00.221Z