diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-08-27 07:37:36 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-08-27 07:37:36 +0400 |
| commit | d268cfcf9f2d86a58456f3f3b946a763d1cc6140 (patch) | |
| tree | 6b086ff15246e3a68c3e5a7052f8adcf50dfeb62 /src/main.rs | |
| parent | 99484afe526dde4c04050f0ea7c98dc63f444fdf (diff) | |
| download | niri-d268cfcf9f2d86a58456f3f3b946a763d1cc6140.tar.gz niri-d268cfcf9f2d86a58456f3f3b946a763d1cc6140.tar.bz2 niri-d268cfcf9f2d86a58456f3f3b946a763d1cc6140.zip | |
Add initial session / systemd integration
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 40953348..2b5715fd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,7 @@ use std::ffi::OsString; use backend::Backend; use clap::Parser; use niri::Niri; +use sd_notify::NotifyState; use smithay::reexports::calloop::EventLoop; use smithay::reexports::wayland_server::{Display, DisplayHandle}; use tracing_subscriber::EnvFilter; @@ -121,4 +122,9 @@ fn main() { } }) .unwrap(); + + // Tell systemd we're stopping. + if let Err(err) = sd_notify::notify(false, &[NotifyState::Stopping]) { + warn!("error notifying systemd: {err:?}"); + } } |
