wayle-notification 0.1.3

Desktop notification service with popup management
Documentation

wayle-notification

Desktop notification service implementing the freedesktop.org Desktop Notifications spec.

Crates.io docs.rs License: MIT

Installation

cargo add wayle-notification

Usage

use wayle_notification::NotificationService;
use futures::StreamExt;

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

    let count = service.notifications.get().len();
    println!("{count} notifications");

    let mut stream = service.notifications.watch();
    while let Some(notifications) = stream.next().await {
        println!("{} notifications", notifications.len());
    }

    Ok(())
}

License

MIT

Part of wayle-services.