summaryrefslogtreecommitdiff
path: root/src/bin/piss-level/main.rs
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <silas@exvacuum.dev>2024-12-25 00:24:16 -0500
committerLibravatar Silas Bartha <silas@exvacuum.dev>2024-12-25 00:24:16 -0500
commit2accad049d07ee9dbb844093396968f68d406204 (patch)
tree4fc9877bcbd321de1ece87f9b7285c0abc8e363b /src/bin/piss-level/main.rs
Initial CommitHEADmaster
Diffstat (limited to 'src/bin/piss-level/main.rs')
-rw-r--r--src/bin/piss-level/main.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bin/piss-level/main.rs b/src/bin/piss-level/main.rs
new file mode 100644
index 0000000..613407a
--- /dev/null
+++ b/src/bin/piss-level/main.rs
@@ -0,0 +1,13 @@
+use std::error::Error;
+
+use zbus::Connection;
+
+#[tokio::main]
+async fn main() -> Result<(), Box<dyn Error>>{
+ let connection = Connection::session().await?;
+
+ let m = connection.call_method(Some("dev.exvacuum.pissd"), "/dev/exvacuum/pissd", Some("dev.exvacuum.pissd"),"GetPissPercentage", &()).await?;
+ let reply = m.body().deserialize::<f32>().unwrap();
+ println!("{}", reply);
+ Ok(())
+}