ddc-enhanced-rs
is a cross platform Rust crate and Node package for controlling monitors with DDC/CI.
Rust: https://docs.rs/ddc-enhanced-rs
NodeJS: https://github.com/ThalusA/ddc-enhanced-rs/blob/master/index.d.ts
```rust use ddcenhancedrs::{getenhanceddisplays, getbrightness, setbrightness};
// index in array is the id of the display fn main() -> Result<(), std::io::Error> { for id in getenhanceddisplays()?.len() { let value = getbrightness(id)?.value(); setbrightness(id, value + 2).unwrap(); } Ok(()) } ```
```javascript import Display from "ddc-enhanced-rs";
for (const displayinfo of Display.list()) { const display = new Display(displayinfo.id); const { value } = display.brightness; display.set_brightness(value + 2); } ```