wayle-notification
Desktop notification service implementing the freedesktop.org Desktop Notifications spec.
Installation
Usage
use NotificationService;
use StreamExt;
async
License
MIT
Part of wayle-services.
Desktop notification service implementing the freedesktop.org Desktop Notifications spec.
cargo add wayle-notification
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(())
}
MIT
Part of wayle-services.