🩹 I genuinely forgot this was async. (Uses non-blocking systemd manager proxy)
This commit is contained in:
parent
8fc34b75b4
commit
b614753cff
1 changed files with 3 additions and 1 deletions
|
|
@ -3,10 +3,12 @@
|
||||||
use color_eyre::{eyre::WrapErr, Result};
|
use color_eyre::{eyre::WrapErr, Result};
|
||||||
|
|
||||||
pub async fn start_systemd_target() -> 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")?;
|
.wrap_err("failed to connect to org.freedesktop.systemd1.Manager")?;
|
||||||
manager
|
manager
|
||||||
.start_unit("cosmic-session.target", "replace")
|
.start_unit("cosmic-session.target", "replace")
|
||||||
|
.await
|
||||||
.wrap_err("failed to start cosmic-session.target")?;
|
.wrap_err("failed to start cosmic-session.target")?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue