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 --- dwm.c | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index 0f23ab16..ebbf7dd7 100644 --- a/dwm.c +++ b/dwm.c @@ -175,6 +175,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); @@ -973,6 +974,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) { @@ -2147,10 +2154,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