diff --git a/dwm.c b/dwm.c index 1655dc7..32db32f 100644 --- a/dwm.c +++ b/dwm.c @@ -175,6 +175,7 @@ static void attachstack(Client *c); static void buttonpress(XEvent *e); static void checkotherwm(void); static void cleanup(void); +static void cleanupautostart(void); static void cleanupmon(Monitor *mon); static void clientmessage(XEvent *e); static void configure(Client *c); @@ -222,7 +223,7 @@ static void resizemouse(const Arg *arg); static void resizerequest(XEvent *e); static void restack(Monitor *m); static void run(void); -static void runAutostart(void); +static void runautostart(void); static void scan(void); static int sendevent(Window w, Atom proto, int m, long d0, long d1, long d2, long d3, long d4); static void sendmon(Client *c, Monitor *m); @@ -535,6 +536,12 @@ cleanup(void) XDeleteProperty(dpy, root, netatom[NetActiveWindow]); } +void +cleanupautostart(void) +{ + system("cd ~/suckless/dwm; ./cleanup_autostart.sh"); +} + void cleanupmon(Monitor *mon) { @@ -1551,7 +1558,7 @@ run(void) } void -runAutostart(void) +runautostart(void) { system("cd ~/suckless/dwm; ./autostart_blocking.sh"); system("cd ~/suckless/dwm; ./autostart.sh &"); @@ -2507,8 +2514,9 @@ main(int argc, char *argv[]) die("pledge"); #endif /* __OpenBSD__ */ scan(); - runAutostart(); + runautostart(); run(); + cleanupautostart(); cleanup(); XCloseDisplay(dpy); return EXIT_SUCCESS;