Add friendly device name to Brightness API#13
Merged
stephaneyfx merged 2 commits intostephaneyfx:masterfrom Sep 2, 2025
Merged
Add friendly device name to Brightness API#13stephaneyfx merged 2 commits intostephaneyfx:masterfrom
stephaneyfx merged 2 commits intostephaneyfx:masterfrom
Conversation
Introduces a `friendly_device_name` method to both async and blocking Brightness traits and implementations for Linux and Windows. Example code updated to display the friendly device name instead of the technical device name, improving user-facing output.
There was a problem hiding this comment.
Pull Request Overview
This PR adds a friendly_device_name method to the Brightness API to provide user-friendly device names alongside the existing technical device names. This improves the user experience when displaying device information.
- Adds
friendly_device_namemethod to both async and blocking Brightness traits - Implements the method for Linux (returns same as device name) and Windows (returns friendly name from system)
- Updates example code to use friendly names for better user-facing output
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib.rs | Adds friendly_device_name method to async Brightness trait and its implementation |
| src/blocking.rs | Adds friendly_device_name method to blocking Brightness trait and its implementation |
| src/windows.rs | Implements async friendly_device_name for Windows devices |
| src/blocking/windows.rs | Adds friendly_name field and implements blocking friendly_device_name for Windows |
| src/linux.rs | Implements async friendly_device_name for Linux devices (returns device name) |
| src/blocking/linux.rs | Implements blocking friendly_device_name for Linux devices (returns device name) |
| examples/set_brightness_blocking.rs | Updates example to display friendly device name |
| examples/set_brightness_async.rs | Updates example to display friendly device name |
| examples/list_displays_async.rs | Adds friendly name display to device listing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
… review feedback.
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.
Introduces a
friendly_device_namemethod to both async and blocking Brightness traits and implementations for Linux and Windows (On Linux, right now it just falls back todevice_name). Example code updated to display the friendly device name instead of the technical device name, improving user-facing output.This addresses #12