Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jridgewell/studio-display-control
Set the brightness of an Apple Studio Display in Node.js.
https://github.com/jridgewell/studio-display-control
Last synced: 17 days ago
JSON representation
Set the brightness of an Apple Studio Display in Node.js.
- Host: GitHub
- URL: https://github.com/jridgewell/studio-display-control
- Owner: jridgewell
- Created: 2024-04-18T09:49:26.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-19T05:23:18.000Z (8 months ago)
- Last Synced: 2024-04-24T08:00:06.884Z (8 months ago)
- Language: TypeScript
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# studio-display-control
Set the brightness of an Apple Studio Display in Node.js.
## Why?
So that I can control the brightness in Windows.
## Installation
```bash
npm install studio-display-control
```## Usage
```typescript
import { getDisplays } from 'studio-display-control';for (const display of getDisplays()) {
// Get the current brightness as a percent.
console.log(await display.getBrightness()); // 100// Set the brightness as a percent.
console.log(await display.setBrightness(50));
// And it's reflected on the next get.
console.log(await display.getBrightness()); // 50// Access the serial number of the display.
console.log(await display.getSerialNumber());
}
```# License
MIT