#ddc-ci #ddc #linux

ddc-node-rs

DDC/CI high level library for Rust (cross platform)

1 stable release

2.0.0 Jul 8, 2022

#14 in #ddc

MIT license

36KB
720 lines

ddc-node-rs

ddc-node-rs is a cross-platform Node package for controlling monitors with DDC/CI.

Documentation

https://github.com/ThalusA/ddc-node-rs/blob/master/index.d.ts

Examples

import { Display, DisplayManager, VCPFeatures } from "ddc-node-rs";

const displays = new DisplayManager().collect();

for (const display of displays) {
    const vcp_feature = display.getVcpFeature(VCPFeatures.ImageAdjustment.Luminance);
    console.info(`Display at index ${display.index} have a brightness value of`);
    console.info(vcp_feature);
    display.setVcpFeature(VCPFeatures.ImageAdjustment.Luminance,
                          vcp_feature.currentValue + 5);
}

Dependencies

~3–4.5MB
~86K SLoC