diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index c9d10ea0..57308f6b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,6 +5,7 @@ mod animation; mod backend; mod config; mod cursor; +#[cfg(feature = "dbus")] mod dbus; mod frame_clock; mod handlers; @@ -37,8 +38,6 @@ use tracing_subscriber::EnvFilter; use utils::spawn; use watcher::Watcher; -use crate::dbus::DBusServers; - #[derive(Parser)] #[command(author, version, about, long_about = None)] struct Cli { @@ -104,12 +103,14 @@ fn main() { import_env_to_systemd(); // Inhibit power key handling so we can suspend on it. + #[cfg(feature = "dbus")] if let Err(err) = state.niri.inhibit_power_key() { warn!("error inhibiting power key: {err:?}"); } } - DBusServers::start(&mut state, is_systemd_service); + #[cfg(feature = "dbus")] + dbus::DBusServers::start(&mut state, is_systemd_service); // Notify systemd we're ready. if let Err(err) = sd_notify::notify(true, &[NotifyState::Ready]) { |
