brightness 0.1.0

Get and set brightness (Linux only)
Documentation

Overview

Definitions to get and set brightness on Linux. This relies on D-Bus and logind.

Example

use brightness::Brightness;
use futures::TryStreamExt;

async fn show_brightness() -> Result<(), brightness::Error> {
    brightness::brightness_devices().try_for_each(|dev| async move {
        let name = dev.device_name().await?;
        let value = dev.get().await?;
        println!("Brightness of device {} is {}%", name, value);
        Ok(())
    }).await
}

Contribute

All contributions shall be licensed under the 0BSD license.