Skip to content

feat: Notch Overflow — access menu bar icons hidden behind the camera notch#350

Open
mehmetnadir wants to merge 1 commit intodwarvesf:developfrom
mehmetnadir:feature/notch-overflow
Open

feat: Notch Overflow — access menu bar icons hidden behind the camera notch#350
mehmetnadir wants to merge 1 commit intodwarvesf:developfrom
mehmetnadir:feature/notch-overflow

Conversation

@mehmetnadir
Copy link
Copy Markdown

Summary

On Macs with a camera notch (MacBook Pro 14"/16", MacBook Air M2+), when there are many menu bar icons, some get pushed behind the notch and become completely inaccessible. This PR adds a Notch Overflow feature that lets users access those hidden icons.

How it works

  • Uses NSScreen.safeAreaInsets (macOS 12+) to detect if the Mac has a notch
  • Enumerates all menu bar extras from all running apps via the Accessibility API (AXUIElement)
  • Compares each item's screen position against the notch boundary to classify as hidden or visible
  • Presents a dropdown menu with all items — hidden ones highlighted in orange
  • Clicking an item triggers AXPress on the original menu bar extra

Access methods

Method Description
⌘⇧B Global hotkey — shows overflow menu at cursor (works anywhere)
Right-click ‹ Right-click the expand/collapse button → "Show Notch Items"
Right-click ǀ Right-click the separator → "Show Notch Items"

Screenshots

The overflow menu classifies items:

  • 🟠 Orange = hidden behind the notch
  • Normal = visible in the menu bar

Technical details

  • New file: hidden/Features/NotchOverflow/NotchOverflowController.swift
  • Uses HotKey framework (already a dependency) for the global shortcut
  • Zero impact on non-notch Macs (NotchOverflowController.hasNotch returns false)
  • Requires Accessibility permission (prompted on first use)
  • 429 lines added, 15 modified across 8 files

Test plan

  • Verify on a notch Mac: ⌘⇧B opens overflow menu at cursor
  • Verify hidden items shown in orange, visible in normal color
  • Verify clicking a menu item activates the original menu bar extra
  • Verify right-click on expand button shows "Show Notch Items"
  • Verify right-click on separator shows "Show Notch Items"
  • Verify on a non-notch Mac: no UI changes, no overhead
  • Verify Accessibility permission prompt appears on first use

🤖 Generated with Claude Code

…otch

On Macs with a camera notch, menu bar icons that overflow past the notch
become inaccessible. This feature uses the Accessibility API to enumerate
all menu bar extras and their positions, then presents hidden items in a
dropdown menu.

Access methods:
- Global hotkey: Cmd+Shift+B (shows menu at cursor position)
- Right-click the expand/collapse button → "Show Notch Items"
- Right-click the separator → "Show Notch Items"

Features:
- Detects notch presence via NSScreen.safeAreaInsets (macOS 12+)
- Enumerates all menu bar extras via AXUIElement API
- Classifies items as hidden (behind notch) or visible by position
- Hidden items displayed in orange for visual distinction
- Clicking an item triggers AXPress on the original menu extra
- Info label in Preferences window explains available shortcuts
- Only activates on Macs with a notch; no-op on other models

New files:
- hidden/Features/NotchOverflow/NotchOverflowController.swift

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant