From da869fadd0aa4ecd0be5ee0c4576d8160cb9f4b4 Mon Sep 17 00:00:00 2001 From: Jackson Taylor Date: Sat, 18 Jun 2022 21:47:42 -0400 Subject: Add cmd-customize patch --- patches/dwm-cmdcustomize-20180504-3bd8466.diff | 139 +++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 patches/dwm-cmdcustomize-20180504-3bd8466.diff (limited to 'patches') diff --git a/patches/dwm-cmdcustomize-20180504-3bd8466.diff b/patches/dwm-cmdcustomize-20180504-3bd8466.diff new file mode 100644 index 00000000..1a451518 --- /dev/null +++ b/patches/dwm-cmdcustomize-20180504-3bd8466.diff @@ -0,0 +1,139 @@ +diff --git a/dwm.1 b/dwm.1 +index e3b2c38..76011c7 100644 +--- a/dwm.1 ++++ b/dwm.1 +@@ -3,7 +3,27 @@ + dwm \- dynamic window manager + .SH SYNOPSIS + .B dwm +-.RB [ \-v ] ++.RB [ \-vh ] ++.RB [ \-fn ++.IR font ] ++.RB [ \-nb ++.IR color ] ++.RB [ \-nf ++.IR color ] ++.RB [ \-sb ++.IR color ] ++.RB [ \-sf ++.IR color ] ++.RB [ \-df ++.IR font ] ++.RB [ \-dnb ++.IR color ] ++.RB [ \-dnf ++.IR color ] ++.RB [ \-dsb ++.IR color ] ++.RB [ \-dsf ++.IR color ] + .SH DESCRIPTION + dwm is a dynamic window manager for X. It manages windows in tiled, monocle + and floating layouts. Either layout can be applied dynamically, optimising the +@@ -34,6 +54,43 @@ dwm draws a small border around windows to indicate the focus state. + .TP + .B \-v + prints version information to standard output, then exits. ++.TP ++.B \-h --help ++prints short help ++.TP ++.BI \-fn " font" ++defines the font or font set used. ++.TP ++.BI \-nb " color" ++defines the normal background color. ++.IR #RGB , ++.IR #RRGGBB , ++and X color names are supported. ++.TP ++.BI \-nf " color" ++defines the normal foreground color. ++.TP ++.BI \-sb " color" ++defines the selected background color. ++.TP ++.BI \-sf " color" ++defines the selected foreground color. ++.TP ++.BI \-df " font" ++defines the font used in dmenu_run. ++.TP ++.BI \-dnb " color" ++defines the normal background color in dmenu_run. ++.TP ++.BI \-dnf " color" ++defines the normal foreground color in dmenu_run. ++.TP ++.BI \-dsb " color" ++defines the selected background color in dmenu_run. ++.TP ++.BI \-dsf " color" ++defines the selected foreground color in dmenu_run. ++.TP + .SH USAGE + .SS Status bar + .TP +diff --git a/dwm.c b/dwm.c +index c98678d..dc1a679 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -174,6 +174,7 @@ static long getstate(Window w); + static int gettextprop(Window w, Atom atom, char *text, unsigned int size); + static void grabbuttons(Client *c, int focused); + static void grabkeys(void); ++static char* help(); + static void incnmaster(const Arg *arg); + static void keypress(XEvent *e); + static void killclient(const Arg *arg); +@@ -963,6 +964,12 @@ grabkeys(void) + } + } + ++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"; ++} ++ + void + incnmaster(const Arg *arg) + { +@@ -2127,10 +2134,32 @@ zoom(const Arg *arg) + int + main(int argc, char *argv[]) + { +- if (argc == 2 && !strcmp("-v", argv[1])) +- die("dwm-"VERSION); +- else if (argc != 1) +- die("usage: dwm [-v]"); ++ for(int i=1;i