Thanks to visit codestin.com
Credit goes to lib.rs

3 releases

Uses new Rust 2024

0.1.2 Apr 3, 2026
0.1.1 Mar 30, 2026
0.1.0 Mar 30, 2026

#718 in Hardware support

Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

231 downloads per month

MIT license

80KB
1.5K SLoC

Wayle

wayle-power-profiles

Power profile switching and monitoring via power-profiles-daemon D-Bus.

Crates.io docs.rs License: MIT

Installation

cargo add wayle-power-profiles

Usage

use wayle_power_profiles::PowerProfilesService;
use futures::StreamExt;

async fn example() -> Result<(), wayle_power_profiles::Error> {
    let service = PowerProfilesService::new().await?;

    // Snapshot: check the current profile
    let profile = service.power_profiles.active_profile.get();
    println!("Current profile: {profile}");

    // Watch: log whenever the power profile switches
    let mut stream = service.power_profiles.active_profile.watch();
    while let Some(profile) = stream.next().await {
        println!("Profile switched to: {profile}");
    }
    Ok(())
}

License

MIT

Part of wayle-services.

Dependencies

~14–24MB
~394K SLoC