Skip to content

Conversation

@wangfu91
Copy link
Contributor

@wangfu91 wangfu91 commented Aug 18, 2025

Introduces a friendly_device_name method to both async and blocking Brightness traits and implementations for Linux and Windows (On Linux, right now it just falls back to device_name). Example code updated to display the friendly device name instead of the technical device name, improving user-facing output.

This addresses #12

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.
Copilot AI review requested due to automatic review settings August 18, 2025 03:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_name method 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.

@stephaneyfx stephaneyfx self-requested a review September 2, 2025 04:57
Copy link
Owner

@stephaneyfx stephaneyfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@stephaneyfx stephaneyfx merged commit 530e849 into stephaneyfx:master Sep 2, 2025
2 checks 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.

2 participants