Apply autostart patch

This commit is contained in:
Pijus Kamandulis 2021-02-28 18:37:56 +02:00
parent ac045cbdd1
commit f6c3ca3e26

8
dwm.c
View File

@ -222,6 +222,7 @@ static void resizemouse(const Arg *arg);
static void resizerequest(XEvent *e); static void resizerequest(XEvent *e);
static void restack(Monitor *m); static void restack(Monitor *m);
static void run(void); static void run(void);
static void runAutostart(void);
static void scan(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 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); static void sendmon(Client *c, Monitor *m);
@ -1549,6 +1550,12 @@ run(void)
handler[ev.type](&ev); /* call handler */ handler[ev.type](&ev); /* call handler */
} }
void
runAutostart(void) {
system("cd ~/.dwm; ./autostart_blocking.sh");
system("cd ~/.dwm; ./autostart.sh &");
}
void void
scan(void) scan(void)
{ {
@ -2497,6 +2504,7 @@ main(int argc, char *argv[])
#endif /* __OpenBSD__ */ #endif /* __OpenBSD__ */
scan(); scan();
run(); run();
runAutostart();
cleanup(); cleanup();
XCloseDisplay(dpy); XCloseDisplay(dpy);
return EXIT_SUCCESS; return EXIT_SUCCESS;