Skip to content

Feature Request: Multi-platform Operating System Support #2

@zhouraym

Description

@zhouraym

Feature Request: Multi-platform Operating System Support

Description

Currently, node-brightness appears to have limited operating system support. It would be great to extend the library to support multiple operating systems including Windows, macOS, and various Linux distributions.

Current Status

The library seems to be primarily focused on Linux systems. Cross-platform compatibility would greatly increase its usability for Node.js applications that need to run on different operating systems.

Proposed Enhancement

Add support for:

  • Windows: Utilize WMI (Windows Management Instrumentation) or Windows API calls to control screen brightness
  • macOS: Use Core Graphics framework or AppleScript for brightness control
  • Linux: Maintain current functionality while ensuring compatibility across different distributions

Implementation Suggestions

  1. Implement OS detection to determine the current platform
  2. Create platform-specific modules for brightness control
  3. Provide a unified API that abstracts the underlying OS differences
  4. Add comprehensive error handling for unsupported platforms
  5. Include platform-specific installation instructions and dependencies

Benefits

  • Broader adoption of the library across different development environments
  • Simplified cross-platform development for applications requiring brightness control
  • More robust error handling and user feedback

Additional Considerations

  • Consider adding TypeScript definitions for better developer experience
  • Include platform-specific examples in the documentation
  • Add automated testing across different operating systems in CI/CD pipeline

Would be happy to contribute to this enhancement if there's interest from the maintainers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions