Crate brightness[][src]

Expand description

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.

Structs

Brightness device

Enums

Errors used in this API

Traits

Interface to get and set brightness

Functions

Returns all brightness devices on the running system