🩹 I genuinely forgot this was async. (Uses non-blocking systemd manager proxy)

This commit is contained in:
Lucy 2022-07-15 11:06:29 -04:00
parent 8fc34b75b4
commit b614753cff
No known key found for this signature in database
GPG key ID: EBC517FAD666BBF1

View file

@ -3,10 +3,12 @@
use color_eyre::{eyre::WrapErr, Result};
pub async fn start_systemd_target() -> Result<()> {
let manager = systemd_client::manager::build_blocking_proxy()
let manager = systemd_client::manager::build_nonblock_proxy()
.await
.wrap_err("failed to connect to org.freedesktop.systemd1.Manager")?;
manager
.start_unit("cosmic-session.target", "replace")
.await
.wrap_err("failed to start cosmic-session.target")?;
Ok(())
}