Skip to content

Add per-display selection for ring light effect#8

Merged
Aayush9029 merged 2 commits into
mainfrom
copilot/add-ring-light-display-limit
Nov 18, 2025
Merged

Add per-display selection for ring light effect#8
Aayush9029 merged 2 commits into
mainfrom
copilot/add-ring-light-display-limit

Conversation

Copilot AI commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

Ring light currently appears on all connected displays. Users with multi-monitor setups need to limit it to a specific display.

Changes

Model & Persistence

  • Added selectedDisplayID: UInt32 to RingLightSettings (0 = all displays)
  • Wired through controller to engine via update() signature

Display Filtering

  • RingLightEngine.realizeWindowsIfNeeded() now filters screens:
    if selectedDisplayID != 0 && identifier.rawValue != selectedDisplayID {
        return nil
    }

UI

  • Display picker in ContentView populates via availableDisplays()
  • Shows "All Displays" + enumerated screens using NSScreen.localizedName
  • Bound to @Shared(.ringLightSelectedDisplayID) for persistence

Default behavior unchanged (all displays). Selection persists across launches.

Original prompt

This section details on the original issue you should resolve

<issue_title>Specify display to show light on</issue_title>
<issue_description>Add the ability to limit the ring light to a specific display so it doesn't appear on every monitor that is connected to the laptop.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Aayush9029 <43297314+Aayush9029@users.noreply.github.com>
Copilot AI changed the title [WIP] Add option to limit ring light to specific display Add per-display selection for ring light effect Nov 17, 2025
Copilot AI requested a review from Aayush9029 November 17, 2025 19:37
@Aayush9029

Copy link
Copy Markdown
Owner

@copilot verify that correct api is being used, use web / search tool if needed

Copilot AI commented Nov 18, 2025

Copy link
Copy Markdown
Contributor Author

@copilot verify that correct api is being used, use web / search tool if needed

✅ API verification complete. The implementation uses the correct Apple APIs:

Screen Identification:

  • NSDeviceDescriptionKey("NSScreenNumber") → Returns CGDirectDisplayID (UInt32)
  • Standard approach per Apple docs, stable across reconnections

Display Names:

  • NSScreen.localizedName → Available since macOS 10.15
  • Returns user-friendly names (e.g., "Built-in Retina Display")
  • Deployment target is macOS 14.0, fully compatible
  • Fallback to "Display N" for empty names

Screen Collection:

  • NSScreen.screens → Standard API for all connected displays

All APIs are modern, correct, and follow Apple's best practices. No changes needed.

References:

@Aayush9029 Aayush9029 marked this pull request as ready for review November 18, 2025 03:16
@Aayush9029 Aayush9029 merged commit b487bee into main Nov 18, 2025
1 check passed
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.

Specify display to show light on

2 participants