Skip to content

wayle-rs/wayle-services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

115 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wayle

wayle-services

CI license

Reactive system service crates for Linux desktops. Each service exposes its state as Property<T> fields you can .get() or .watch() for changes.

Services

Crate Description
wayle-audio PulseAudio devices and streams
wayle-battery Battery monitoring via UPower
wayle-bluetooth Bluetooth device management via BlueZ
wayle-brightness Backlight control for internal displays
wayle-cava Real-time audio frequency visualization
wayle-hyprland Hyprland compositor state and events
wayle-media MPRIS media player control
wayle-network WiFi and wired network management
wayle-notification Desktop notification daemon
wayle-power-profiles Power profile switching
wayle-sysinfo CPU, memory, disk, and network metrics
wayle-systray System tray via StatusNotifier
wayle-wallpaper Wallpaper management with color extraction
wayle-weather Weather data with multi-provider support

Internals

Crate Description
wayle-core Property<T> reactive primitive and D-Bus macros
wayle-traits Shared service monitoring traits

Quick start

use futures::StreamExt;
use wayle_audio::AudioService;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let audio = AudioService::new().await?;

    // snapshot
    if let Some(device) = audio.default_output.get() {
        println!("default output: {:?}", device);
    }

    // react to changes
    let mut stream = audio.default_output.watch();
    while let Some(device) = stream.next().await {
        println!("default output changed: {:?}", device);
    }

    Ok(())
}

Credits

Logo by @M70v.

License

MIT