How ganeshedula/realme_air_7_controller_for_mac works
Air 7 Menu is a native macOS menu-bar companion for realme Buds Air 7. Its main workflow is to observe earbud connections and audio output, establish the earbuds’ Bluetooth control channel, parse device replies into connection and battery/control state, then present status and controls in the menu bar or a connection pop-up. The app also supports low-battery notifications and launch-at-login preferences; a separate monitor can relaunch the app on a fresh connection. Some protocol and hardware behavior is firmware-dependent; unsampled model code limits the detail of its internal links.
Main entry points: EarbudModel.swift Earbud model · main.swift Air7Monitor · Air7MenuApp.swift Menu bar app · PopoverView.swift Menu controls and battery views
Components 10
Connection monitoring
- Air7Monitor
Sources/Air7Monitor/main.swift
Device communication
- RFCOMM framing and decoding
Sources/Air7Menu/Air7FrameParser.swift
App state and lifecycle
- Earbud model
Sources/Air7Menu/EarbudModel.swift - Menu bar app
Sources/Air7Menu/Air7MenuApp.swift - Login and connection preferences
Sources/Air7Menu/EarbudModel.swift
User interface
- Menu controls and battery views
Sources/Air7Menu/PopoverView.swift
Other components
- User
- macOS Bluetooth
- Default audio output
- macOS notifications
Connections 13
- macOS Bluetooth → Air7Monitor: reports connection events
Sources/Air7Monitor/main.swift - Air7Monitor → Menu bar app: launches on connection
Sources/Air7Monitor/main.swift - Air7Monitor → Earbud model: posts connection event
Sources/Air7Monitor/main.swift - macOS Bluetooth → Earbud model: provides device access
Sources/Air7Menu/EarbudModel.swift - Default audio output → Earbud model: provides output state
Sources/Air7Menu/EarbudModel.swift - Earbud model → RFCOMM framing and decoding: uses frame parser
Sources/Air7Menu/EarbudModel.swift - Menu bar app → Earbud model: creates and configures
Sources/Air7Menu/Air7MenuApp.swift - Menu bar app → Menu controls and battery views: presents controls
Sources/Air7Menu/Air7MenuApp.swift - Menu controls and battery views → Earbud model: reads state and sends actions
Sources/Air7Menu/PopoverView.swift - Earbud model → macOS notifications: posts battery alerts
Sources/Air7Menu/EarbudModel.swift - User → Menu controls and battery views: views and adjusts
Sources/Air7Menu/PopoverView.swift - User → Login and connection preferences: sets preferences
- Login and connection preferences → Air7Monitor: shares connection preference
Sources/Air7Monitor/main.swift