summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-30 15:14:08 +0100
committertcmal <me@aria.rip>2024-08-30 15:37:59 +0100
commit7ab9f225632a1de377c4814c80dfa76f81d6c783 (patch)
treeb8e75b3fd920fae52233edc866d43be1bbad8632 /src/main.rs
parente6d583df4243e18707dfabbf375b57d811f07bf3 (diff)
Add optional autostart feature
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 8 insertions, 0 deletions
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(())