Adding cmdcustomize patch

pull/32/head
bakkeby 5 years ago
parent f096d003d9
commit ac4269a4f2

@ -13,7 +13,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog:
2019-10-05 - Added killunsel, taggrid and hidevacanttags patches
2019-10-05 - Added killunsel, taggrid, hidevacanttags and cmdcustomize patches
2019-10-04 - Added maximize, movestack, monoclesymbol, noborder, tagall and tagintostack patches
@ -88,6 +88,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- [cfacts](https://dwm.suckless.org/patches/cfacts/)
- the cfacts patch provides the ability to assign different weights to clients in their respective stack in tiled layout
- [cmdcustomize](https://dwm.suckless.org/patches/cmdcustomize/)
- allows color attributes to be set through the command line
- [combo](https://dwm.suckless.org/patches/combo/)
- allows you to select multiple tags by pressing all the right keys as a combo, e.g. hold MOD and press and hold 1 and 3 together to view those two tags

29
dwm.c

@ -3380,10 +3380,39 @@ zoom(const Arg *arg)
int
main(int argc, char *argv[])
{
#if CMDCUSTOMIZE
for (int i=1;i<argc;i+=1)
if (!strcmp("-v", argv[i]))
die("dwm-"VERSION);
else if (!strcmp("-h", argv[i]) || !strcmp("--help", argv[i]))
die(help());
else if (!strcmp("-fn", argv[i])) /* font set */
fonts[0] = argv[++i];
else if (!strcmp("-nb", argv[i])) /* normal background color */
colors[SchemeNorm][1] = argv[++i];
else if (!strcmp("-nf", argv[i])) /* normal foreground color */
colors[SchemeNorm][0] = argv[++i];
else if (!strcmp("-sb", argv[i])) /* selected background color */
colors[SchemeSel][1] = argv[++i];
else if (!strcmp("-sf", argv[i])) /* selected foreground color */
colors[SchemeSel][0] = argv[++i];
else if (!strcmp("-df", argv[i])) /* dmenu font */
dmenucmd[4] = argv[++i];
else if (!strcmp("-dnb", argv[i])) /* dmenu normal background color */
dmenucmd[6] = argv[++i];
else if (!strcmp("-dnf", argv[i])) /* dmenu normal foreground color */
dmenucmd[8] = argv[++i];
else if (!strcmp("-dsb", argv[i])) /* dmenu selected background color */
dmenucmd[10] = argv[++i];
else if (!strcmp("-dsf", argv[i])) /* dmenu selected foreground color */
dmenucmd[12] = argv[++i];
else die(help());
#else
if (argc == 2 && !strcmp("-v", argv[1]))
die("dwm-"VERSION);
else if (argc != 1)
die("usage: dwm [-v]");
#endif // CMDCUSTOMIZE
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
fputs("warning: no locale support\n", stderr);
if (!(dpy = XOpenDisplay(NULL)))

@ -0,0 +1,5 @@
char*
help(void)
{
return "usage: dwm [-hv] [-fn font] [-nb color] [-nf color] [-sb color] [-sf color]\n[-df font] [-dnf color] [-dnb color] [-dsf color] [-dsb color]\n";
}

@ -0,0 +1 @@
static char* help();

@ -24,6 +24,10 @@
#include "cfacts.c"
#endif
#if CMDCUSTOMIZE
#include "cmdcustomize.c"
#endif
#if COMBO_PATCH
#include "combo.c"
#endif

@ -24,6 +24,10 @@
#include "cfacts.h"
#endif
#if CMDCUSTOMIZE
#include "cmdcustomize.h"
#endif
#if COMBO_PATCH
#include "combo.h"
#endif

@ -98,6 +98,11 @@
*/
#define CFACTS_PATCH 0
/* This patch allows color attributes to be set through the command line.
* https://dwm.suckless.org/patches/cmdcustomize/
*/
#define CMDCUSTOMIZE 0
/* This patch tweaks the tagging interface so that you can select multiple tags for tag
* or view by pressing all the right keys as a combo. For example to view tags 1 and 3,
* hold MOD and then press and hold 1 and 3 together.

Loading…
Cancel
Save