feat: per-peripheral type icons with detection and manual picker - #48
Merged
Conversation
Replace the single shared keyboard glyph with a type-specific icon for each peripheral, in both the menu-bar dropdown and the Peripheral settings tab. The shown type is the user's override if set, else auto-detected from the Bluetooth Class of Device (reliable for audio gear) plus the device name. - PeripheralType enum: keyboard/mouse/trackpad/headphones/airpods/ microphone/unknown, with availability-resolving SF Symbols and detect(name:classOfDevice:). - Store: persisted local typeOverrides map + deviceClasses cache; peripheralType(for:) and setTypeOverride(_:for:). - Settings rows render the icon as a Menu picker (Automatic, the six types, and Other) in both Registered and Available sections. - Live names: reconcile registered names from the live paired list so a rename in System Settings -> Bluetooth propagates; poll while the Peripheral tab is visible, and fetch when the dropdown opens. - Dropdown rows act on mouse-up (released inside the row) rather than mouse-down.
|
🎉 This PR is included in version 2.15.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Each peripheral now shows a type-specific icon instead of the single shared keyboard glyph, in both the menu-bar dropdown and the Peripheral settings tab. The displayed type is the user's manual override if set, otherwise auto-detected.
Changes
PeripheralType— new enum (keyboard / mouse / trackpad / headphones / airpods / microphone / unknown) with availability-resolving SF Symbols (falls back to older glyphs on older macOS) anddetect(name:classOfDevice:).typeOverridesmap + adeviceClassescache populated from the live paired-device snapshot;peripheralType(for:)/setTypeOverride(_:for:).Notes
Test plan
Builds clean and passes
swift format lint.