mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Adding cmdcustomize patch
This commit is contained in:
parent
f096d003d9
commit
ac4269a4f2
@ -13,7 +13,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
|||||||
|
|
||||||
### Changelog:
|
### 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
|
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/)
|
- [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
|
- 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/)
|
- [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
|
- 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
29
dwm.c
@ -3380,10 +3380,39 @@ zoom(const Arg *arg)
|
|||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
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]))
|
if (argc == 2 && !strcmp("-v", argv[1]))
|
||||||
die("dwm-"VERSION);
|
die("dwm-"VERSION);
|
||||||
else if (argc != 1)
|
else if (argc != 1)
|
||||||
die("usage: dwm [-v]");
|
die("usage: dwm [-v]");
|
||||||
|
#endif // CMDCUSTOMIZE
|
||||||
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
||||||
fputs("warning: no locale support\n", stderr);
|
fputs("warning: no locale support\n", stderr);
|
||||||
if (!(dpy = XOpenDisplay(NULL)))
|
if (!(dpy = XOpenDisplay(NULL)))
|
||||||
|
5
patch/cmdcustomize.c
Normal file
5
patch/cmdcustomize.c
Normal file
@ -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";
|
||||||
|
}
|
1
patch/cmdcustomize.h
Normal file
1
patch/cmdcustomize.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
static char* help();
|
@ -24,6 +24,10 @@
|
|||||||
#include "cfacts.c"
|
#include "cfacts.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CMDCUSTOMIZE
|
||||||
|
#include "cmdcustomize.c"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if COMBO_PATCH
|
#if COMBO_PATCH
|
||||||
#include "combo.c"
|
#include "combo.c"
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
#include "cfacts.h"
|
#include "cfacts.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CMDCUSTOMIZE
|
||||||
|
#include "cmdcustomize.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if COMBO_PATCH
|
#if COMBO_PATCH
|
||||||
#include "combo.h"
|
#include "combo.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -98,6 +98,11 @@
|
|||||||
*/
|
*/
|
||||||
#define CFACTS_PATCH 0
|
#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
|
/* 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,
|
* 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.
|
* hold MOD and then press and hold 1 and 3 together.
|
||||||
|
Loading…
Reference in New Issue
Block a user