]> jxnshi.xyz Git - dwm-config.git/commitdiff
Add autostart
authorjxnshi <jxnshi@proton.me>
Fri, 24 Jan 2025 20:11:28 +0000 (21:11 +0100)
committerjxnshi <jxnshi@proton.me>
Fri, 24 Jan 2025 20:11:28 +0000 (21:11 +0100)
dwm.c

diff --git a/dwm.c b/dwm.c
index 59d49f1e6a8a3aed0304133d345508e2783b47db..94e61186c8049574b962c7dd5fdf5c932f5d80af 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -193,6 +193,7 @@ static void resizeclient(Client *c, int x, int y, int w, int h);
 static void resizemouse(const Arg *arg);
 static void restack(Monitor *m);
 static void run(void);
+static void runAutostart(void);
 static void scan(void);
 static int sendevent(Client *c, Atom proto);
 static void sendmon(Client *c, Monitor *m);
@@ -1389,6 +1390,11 @@ run(void)
                        handler[ev.type](&ev); /* call handler */
 }
 
+runAutostart(void) {
+       system("cd ~/.dwm; ./autostart_blocking.sh");
+       system("cd ~/.dwm; ./autostart.sh &");
+}
+
 void
 scan(void)
 {
@@ -2189,6 +2195,7 @@ main(int argc, char *argv[])
 #endif /* __OpenBSD__ */
        scan();
        run();
+       runAutostart();
        cleanup();
        XCloseDisplay(dpy);
        return EXIT_SUCCESS;