Adding autostart patch

This commit is contained in:
bakkeby 2019-09-06 23:37:30 +02:00
parent 04a7b4de40
commit 611460c6a6
7 changed files with 37 additions and 4 deletions

View File

@ -11,7 +11,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog:
2019-09-06 - Added attachabove, attachaside, attachbelow and attachbottom patches
2019-09-06 - Added attachabove, attachaside, attachbelow, attachbottom and autostart patches
2019-09-05 - Alpha, systray, togglefullscreen, tagallmon, tagmonfixfs, tagswapmon, pertag and zoomswap patches added
@ -32,6 +32,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- [attachbottom](https://dwm.suckless.org/patches/attachbottom/)
- new windows are placed at the bottom of the stack
- [autostart](https://dwm.suckless.org/patches/autostart/)
- makes dwm run `~/.dwm/autostart_blocking.sh` and `~/.dwm/autostart.sh &` on startup
- [pertag](https://dwm.suckless.org/patches/pertag/)
- adds nmaster, mfact, layouts and more per tag rather than per monitor

3
dwm.c
View File

@ -2614,6 +2614,9 @@ main(int argc, char *argv[])
die("pledge");
#endif /* __OpenBSD__ */
scan();
#if AUTOSTART_PATCH
runAutostart();
#endif
run();
cleanup();
XCloseDisplay(dpy);

10
patch/autostart.c Normal file
View File

@ -0,0 +1,10 @@
void
runAutostart(void) {
int ret;
ret = system("cd ~/.config/dwm; ./autostart_blocking.sh");
ret = system("cd ~/.config/dwm; ./autostart.sh &");
if (ret); // ignore, hide compilation warnings
}

1
patch/autostart.h Normal file
View File

@ -0,0 +1 @@
static void runAutostart(void);

View File

@ -6,6 +6,10 @@
#include "attachx.c"
#endif
#if AUTOSTART_PATCH
#include "autostart.c"
#endif
#if PERTAG_PATCH
#include "pertag.c"
#endif

View File

@ -6,6 +6,10 @@
#include "attachx.h"
#endif
#if AUTOSTART_PATCH
#include "autostart.h"
#endif
#if SYSTRAY_PATCH
#include "systray.h"
#endif

View File

@ -36,10 +36,13 @@
*/
#define ATTACHBOTTOM_PATCH 0
/* The systray patch adds systray for the status bar.
* https://dwm.suckless.org/patches/systray/
/* This patch will make dwm run "~/.config/dwm/autostart_blocking.sh" and
* "~/.config/dwm/autostart.sh &" before entering the handler loop. One or
* both of these files can be ommited. Note the path inside .config rather
* than the original ~/.dwm folder.
* https://dwm.suckless.org/patches/autostart/
*/
#define SYSTRAY_PATCH 0
#define AUTOSTART_PATCH 0
/* The pertag patch adds nmaster, mfacts and layouts per tag rather
* than per monitor (default).
@ -52,6 +55,11 @@
*/
#define PERTAGBAR_PATCH 0
/* The systray patch adds systray for the status bar.
* https://dwm.suckless.org/patches/systray/
*/
#define SYSTRAY_PATCH 0
/* This patch allows you to move all visible windows on a monitor to an adjacent monitor.
* https://github.com/bakkeby/dwm-vanitygaps/blob/master/patches/dwm-tagallmon-6.2.diff
*/