feat: add zbus crate for org.freedesktop.Accounts

This commit is contained in:
Michael Aaron Murphy 2024-12-04 15:59:50 +01:00
parent 6210012924
commit 0eee63a96c
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
7 changed files with 753 additions and 11 deletions

View file

@ -0,0 +1,13 @@
#[tokio::main]
pub async fn main() {
let uid = std::env::args().nth(1).unwrap().parse::<u64>().unwrap();
let conn = zbus::Connection::system().await.unwrap();
let user = accounts_zbus::UserProxy::from_uid(&conn, uid)
.await
.unwrap();
println!("icon_file: {:?}", user.icon_file().await);
println!("account type: {:?}", user.account_type().await);
println!("password hint: {:?}", user.password_hint().await);
}