-
-
Couldn't load subscription status.
- Fork 137
Description
I've been adding SketchyBar to my setup but I needed this feature to love it.
Built a cursor bouncer app that prevents accidental macOS menu bar triggers while keeping easy access when needed:
- Cursor bounces at 5px from top edge (prevents accidental activation)
- Hold Command key to bypass bouncer and access macOS menu bar
- Menu detection keeps SketchyBar hidden while macOS menus are open
- Smart hide: hides items but keeps bar background visible
Implementation: Swift-based cursor monitor with signed app bundle, integrates via custom SketchyBar events.
You can see code in my dotfiles here:
https://github.com/bwl/dots/tree/master/config/sketchybar
Question for Maintainers
This solution is admittedly a bit janky (requires accessibility permissions, external cursor monitor, modifier key, and most critically for now it's built just for my macbook air screen resolution), but it's very effective and it's making SketchyBar significantly more usable.
How would you like me to share this?
- Core plugin/feature? - Would you accept a polished PR to include this (or similar) functionality in SketchyBar core?
- Community helper/plugin? - Should this live as a separate repo with integration docs?
Future Enhancement Idea
A modifier-less version could use SketchyBar's existing mouse.entered/mouse.exited events to detect intent: if hovering a SketchyBar item, block macOS menu bar; otherwise allow it. But I wanted to get feedback on the current approach first before exploring that direction.
Technical Details:
- Uses CGWarpMouseCursorPosition for cursor bouncing
- CGWindowListCopyWindowInfo for menu detection
- Custom SketchyBar events (cursor_at_top/cursor_away_from_top)
- Requires macOS Accessibility permissions
Happy to collaborate on whatever approach makes sense for the SketchyBar ecosystem!