From 7ab9f225632a1de377c4814c80dfa76f81d6c783 Mon Sep 17 00:00:00 2001 From: tcmal Date: Fri, 30 Aug 2024 15:14:08 +0100 Subject: Add optional autostart feature --- src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index ec2475c..1f98801 100644 --- a/src/main.rs +++ b/src/main.rs @@ -53,6 +53,14 @@ fn main() -> Result<()> { #[allow(clippy::cast_sign_loss)] let mut wm = WM::new(&conn, screen_num as usize)?; + + #[cfg(feature = "autostart")] + { + for to_start in config::AUTOSTART_SCRIPTS { + helpers::spawn(to_start[0], &to_start[1..]); + } + } + wm.event_loop()?; Ok(()) -- cgit v1.2.3