2024-09-01 08:20:17 +00:00
|
|
|
use futures_util::stream::TryStreamExt;
|
2024-09-01 11:31:19 +00:00
|
|
|
use zbus::{Connection, MessageStream, Result};
|
|
|
|
use zvariant::{Type, Value};
|
2024-08-27 11:28:05 +00:00
|
|
|
|
|
|
|
#[tokio::main]
|
|
|
|
async fn main() -> Result<()> {
|
|
|
|
let connection = Connection::session().await?;
|
2024-09-01 08:20:17 +00:00
|
|
|
connection
|
2024-09-01 11:31:19 +00:00
|
|
|
.request_name("org.freedesktop.Notifications") // Requesting dbus for this service name
|
2024-09-01 08:20:17 +00:00
|
|
|
.await?;
|
2024-08-25 21:10:15 +00:00
|
|
|
|
2024-09-01 11:31:19 +00:00
|
|
|
// Process incoming notifs
|
|
|
|
use futures_util::stream::TryStreamExt;
|
|
|
|
|
|
|
|
let mut stream = zbus::MessageStream::from(&connection); // Convert the connection into a message stream
|
|
|
|
while let Some(msg) = stream.try_next().await? {
|
|
|
|
///
|
|
|
|
}
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|