Re: [hackers] [dwm] Another correction
On Wed, Mar 14, 2018 at 02:14:26PM -0400, Christopher Drelich wrote: >README mentions: >If you are going to use the default bluegray color scheme it is highly >recommended to also install the bluegray files shipped in the dextra >package. >dextra only appears to be on [1]suckless.org at: >[2]https://oldgit.suckless.org/dextra/ >I'd recommend either removing that line from README, or moving dextra >to [3]git.suckless.org and linking to it in the README and from >[4]dwm.suckless.org >Not sure the preference. >Chris > > References > >1. http://suckless.org/ >2. https://oldgit.suckless.org/dextra/ >3. http://git.suckless.org/ >4. http://dwm.suckless.org/ Hi, OK changed and pushed. By the way, please configure your client to not send HTML mails to the ML (or me). Thanks, -- Kind regards, Hiltjo
[hackers] [dwm] All functions in alphabetical order except for this one. || Christopher Drelich
commit 76c8c16d79d4fd2a3e776800637d211e4dc8e50a Author: Christopher Drelich AuthorDate: Wed Mar 14 13:58:06 2018 -0400 Commit: Hiltjo Posthuma CommitDate: Wed Mar 14 21:02:06 2018 +0100 All functions in alphabetical order except for this one. diff --git a/dwm.c b/dwm.c index ab16c75..c98678d 100644 --- a/dwm.c +++ b/dwm.c @@ -223,8 +223,8 @@ static void updateclientlist(void); static void updatenumlockmask(void); static void updatesizehints(Client *c); static void updatestatus(void); -static void updatewindowtype(Client *c); static void updatetitle(Client *c); +static void updatewindowtype(Client *c); static void updatewmhints(Client *c); static void view(const Arg *arg); static Client *wintoclient(Window w); @@ -1985,6 +1985,14 @@ updatesizehints(Client *c) } void +updatestatus(void) +{ + if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) + strcpy(stext, "dwm-"VERSION); + drawbar(selmon); +} + +void updatetitle(Client *c) { if (!gettextprop(c->win, netatom[NetWMName], c->name, sizeof c->name)) @@ -1994,14 +2002,6 @@ updatetitle(Client *c) } void -updatestatus(void) -{ - if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) - strcpy(stext, "dwm-"VERSION); - drawbar(selmon); -} - -void updatewindowtype(Client *c) { Atom state = getatomprop(c, netatom[NetWMState]);
[hackers] [dwm] update README: remove mentioning the old dextra repo || Hiltjo Posthuma
commit 3bd8466e93b2c81be86e67c6ecdda4e1d240fe4b Author: Hiltjo Posthuma AuthorDate: Wed Mar 14 21:03:11 2018 +0100 Commit: Hiltjo Posthuma CommitDate: Wed Mar 14 21:03:11 2018 +0100 update README: remove mentioning the old dextra repo Thanks Christopher Drelich diff --git a/README b/README index 7abf1cf..95d4fd0 100644 --- a/README +++ b/README @@ -18,9 +18,6 @@ necessary as root): make clean install -If you are going to use the default bluegray color scheme it is highly -recommended to also install the bluegray files shipped in the dextra package. - Running dwm ---
[hackers] [surf][PATCH] Allow tilde expansion in loaduri
also fixed a bug that ~foo/ was expanded to /home/fo/o/ --- surf.c | 62 +++--- 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/surf.c b/surf.c index f01a91c..8f4ad26 100644 --- a/surf.c +++ b/surf.c @@ -146,6 +146,7 @@ static void sigchld(int unused); static void sighup(int unused); static char *buildfile(const char *path); static char *buildpath(const char *path); +static char *untildepath(const char *path); static const char *getuserhomedir(const char *user); static const char *getcurrentuserhomedir(void); static Client *newclient(Client *c); @@ -470,26 +471,12 @@ getcurrentuserhomedir(void) char * buildpath(const char *path) { - char *apath, *name, *p, *fpath; - const char *homedir; - - if (path[0] == '~') { - if (path[1] == '/' || path[1] == '\0') { - p = (char *)&path[1]; - homedir = getcurrentuserhomedir(); - } else { - if ((p = strchr(path, '/'))) - name = g_strndup(&path[1], --p - path); - else - name = g_strdup(&path[1]); + char *apath, *fpath; - homedir = getuserhomedir(name); - g_free(name); - } - apath = g_build_filename(homedir, p, NULL); - } else { + if (path[0] == '~') + apath = untildepath(path); + else apath = g_strdup(path); - } /* creating directory */ if (g_mkdir_with_parents(apath, 0700) < 0) @@ -501,6 +488,28 @@ buildpath(const char *path) return fpath; } +char * +untildepath(const char *path) +{ + char *apath, *name, *p; + const char *homedir; + + if (path[1] == '/' || path[1] == '\0') { + p = (char *)&path[1]; + homedir = getcurrentuserhomedir(); + } else { + if ((p = strchr(path, '/'))) + name = g_strndup(&path[1], p - (path + 1)); + else + name = g_strdup(&path[1]); + + homedir = getuserhomedir(name); + g_free(name); + } + apath = g_build_filename(homedir, p, NULL); + return apath; +} + Client * newclient(Client *rc) { @@ -522,7 +531,7 @@ void loaduri(Client *c, const Arg *a) { struct stat st; - char *url, *path; + char *url, *path, *apath; const char *uri = a->v; if (g_strcmp0(uri, "") == 0) @@ -533,11 +542,18 @@ loaduri(Client *c, const Arg *a) g_str_has_prefix(uri, "file://") || g_str_has_prefix(uri, "about:")) { url = g_strdup(uri); - } else if (!stat(uri, &st) && (path = realpath(uri, NULL))) { - url = g_strdup_printf("file://%s", path); - free(path); } else { - url = g_strdup_printf("http://%s";, uri); + if (uri[0] == '~') + apath = untildepath(uri); + else + apath = (char *)uri; + if (!stat(apath, &st) && (path = realpath(apath, NULL))) { + url = g_strdup_printf("file://%s", path); + free(path); + } else + url = g_strdup_printf("http://%s";, uri); + if (apath != uri) + free(apath); } setatom(c, AtomUri, url); -- 2.15.1
[hackers] [st] LICENSE: fix a few years || Hiltjo Posthuma
commit 8ab629031bd958d93deee9203fea32c38fe8ac30 Author: Hiltjo Posthuma AuthorDate: Wed Mar 14 20:06:42 2018 +0100 Commit: Hiltjo Posthuma CommitDate: Wed Mar 14 20:08:00 2018 +0100 LICENSE: fix a few years diff --git a/LICENSE b/LICENSE index 84c4d19..c356c39 100644 --- a/LICENSE +++ b/LICENSE @@ -2,15 +2,15 @@ MIT/X Consortium License © 2014-2018 Hiltjo Posthuma © 2018 Devin J. Pohly -© 2017-2017 Quentin Rameau +© 2014-2017 Quentin Rameau © 2009-2012 Aurélien APTEL -© 2009 Anselm R Garbe +© 2008-2017 Anselm R Garbe © 2012-2017 Roberto E. Vargas Caballero © 2012-2016 Christoph Lohmann <20h at r-36 dot net> © 2013 Eon S. Jeon © 2013 Alexander Sedov © 2013 Mark Edgar -© 2013 Eric Pruitt +© 2013-2014 Eric Pruitt © 2013 Michael Forney © 2013-2014 Markus Teich © 2014-2015 Laslo Hunhold
[hackers] [dmenu] bump version to 4.8 || Hiltjo Posthuma
commit 23051d78dd80468042e2a5095533ec68bfb43a51 Author: Hiltjo Posthuma AuthorDate: Wed Mar 14 19:48:05 2018 +0100 Commit: Hiltjo Posthuma CommitDate: Wed Mar 14 19:48:05 2018 +0100 bump version to 4.8 diff --git a/config.mk b/config.mk index de3f1d9..50fe52c 100644 --- a/config.mk +++ b/config.mk @@ -1,5 +1,5 @@ # dmenu version -VERSION = 4.7 +VERSION = 4.8 # paths PREFIX = /usr/local
[hackers] [st] update LICENSE: major contributors || Hiltjo Posthuma
commit a712c2dd1815f83a56be33e8055eee29e05dfef7 Author: Hiltjo Posthuma AuthorDate: Wed Mar 14 20:00:35 2018 +0100 Commit: Hiltjo Posthuma CommitDate: Wed Mar 14 20:00:35 2018 +0100 update LICENSE: major contributors diff --git a/LICENSE b/LICENSE index fa0c63e..84c4d19 100644 --- a/LICENSE +++ b/LICENSE @@ -1,8 +1,11 @@ MIT/X Consortium License +© 2014-2018 Hiltjo Posthuma +© 2018 Devin J. Pohly +© 2017-2017 Quentin Rameau © 2009-2012 Aurélien APTEL © 2009 Anselm R Garbe -© 2012-2016 Roberto E. Vargas Caballero +© 2012-2017 Roberto E. Vargas Caballero © 2012-2016 Christoph Lohmann <20h at r-36 dot net> © 2013 Eon S. Jeon © 2013 Alexander Sedov
[hackers] [st] bump version to 0.8 || Hiltjo Posthuma
commit 49a4f91fc5caf4b8b64f2b73a6be506fa06917b9 Author: Hiltjo Posthuma AuthorDate: Wed Mar 14 19:50:37 2018 +0100 Commit: Hiltjo Posthuma CommitDate: Wed Mar 14 19:50:37 2018 +0100 bump version to 0.8 diff --git a/config.mk b/config.mk index 0aceec4..b2eac10 100644 --- a/config.mk +++ b/config.mk @@ -1,5 +1,5 @@ # st version -VERSION = 0.7 +VERSION = 0.8 # Customize below to fit your system
[hackers] [st] Makefile: add all files to make dist || Hiltjo Posthuma
commit 0f245dfeb9bb4e87a005da2ecdcd7a88ba6e7f32 Author: Hiltjo Posthuma AuthorDate: Wed Mar 14 19:54:50 2018 +0100 Commit: Hiltjo Posthuma CommitDate: Wed Mar 14 19:54:50 2018 +0100 Makefile: add all files to make dist diff --git a/Makefile b/Makefile index c678ead..0b3cecd 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,9 @@ clean: dist: clean mkdir -p st-$(VERSION) - cp -R LICENSE Makefile README config.mk config.def.h st.info st.1 arg.h $(SRC) st-$(VERSION) + cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\ + config.def.h st.info st.1 arg.h st.h win.h $(SRC)\ + st-$(VERSION) tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz rm -rf st-$(VERSION)
[hackers] [dwm] Another correction
README mentions: If you are going to use the default bluegray color scheme it is highly recommended to also install the bluegray files shipped in the dextra package. dextra only appears to be on suckless.org at: https://oldgit.suckless.org/dextra/ I'd recommend either removing that line from README, or moving dextra to git.suckless.org and linking to it in the README and from dwm.suckless.org Not sure the preference. Chris
[hackers] [dwm][PATCH] All functions in alphabetical order except for this one.
--- dwm.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dwm.c b/dwm.c index 3ed065c..2c1fd4c 100644 --- a/dwm.c +++ b/dwm.c @@ -223,8 +223,8 @@ static void updateclientlist(void); static void updatenumlockmask(void); static void updatesizehints(Client *c); static void updatestatus(void); -static void updatewindowtype(Client *c); static void updatetitle(Client *c); +static void updatewindowtype(Client *c); static void updatewmhints(Client *c); static void view(const Arg *arg); static Client *wintoclient(Window w); @@ -1985,6 +1985,14 @@ updatesizehints(Client *c) } void +updatestatus(void) +{ + if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) + strcpy(stext, "dwm-"VERSION); + drawbar(selmon); +} + +void updatetitle(Client *c) { if (!gettextprop(c->win, netatom[NetWMName], c->name, sizeof c->name)) @@ -1994,14 +2002,6 @@ updatetitle(Client *c) } void -updatestatus(void) -{ - if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) - strcpy(stext, "dwm-"VERSION); - drawbar(selmon); -} - -void updatewindowtype(Client *c) { Atom state = getatomprop(c, netatom[NetWMState]); -- 2.7.4
[hackers] [dwm][PATCH] Pedantic change in comment (fewer, not less).
--- dwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwm.c b/dwm.c index ab16c75..3ed065c 100644 --- a/dwm.c +++ b/dwm.c @@ -1889,7 +1889,7 @@ updategeom(void) m->mh = m->wh = unique[i].height; updatebarpos(m); } - } else { /* less monitors available nn < n */ + } else { /* fewer monitors available nn < n */ for (i = nn; i < n; i++) { for (m = mons; m && m->next; m = m->next); while ((c = m->clients)) { -- 2.7.4
Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.
Ok, so that is an absolute requirement then, and the only issue? Was doing the patching in a very unconfigured chroot environment on a temporary computer, so hadn't setup email on there. I will for next time. I know there are plenty of patches for dwm available, and I've made plenty of my own that are not meant for mainstream (I'll clean them up and submit someday.) I was wondering though, are there any things that are wanted for mainstream dwm? Happy to help. The TODO file seemed rather old, and I wasn't quite clear on what was meant by the updategeom hook. I also don't know what an appropriate change for scrot would be, as something with that functionality is available as a patch already (I'm guessing though something about it doesn't conform to mainstream dwm?) Chris On Wed, Mar 14, 2018 at 1:19 PM, Silvan Jegen wrote: > Hi > > On Wed, Mar 14, 2018 at 5:58 PM, Christopher Drelich > wrote: > > Any idea what I might have done wrong in creating the patch? I figure > > learning now will save us all time in the future. > > > > I followed the instructions on the website and used a fresh pull of dwm. > > Looking at what's in git, it seems the same to me, other than my email as > > you noted. > > You should use git send-email to send your patches by email (this > command consumes the output of git format-patch). I just saw that > https://suckless.org/hacking does not mention this... > > > Cheers, > > Silvan > > > > Chris > > > > On Wed, Mar 14, 2018 at 12:48 PM, Hiltjo Posthuma < > hil...@codemadness.org> > > wrote: > >> > >> On Wed, Mar 14, 2018 at 10:12:55AM -0400, Christopher Drelich wrote: > >> >My first patch, I'm hoping this is the way you want them > submitted. I > >> >couldn't find any reason for ColBorder to be a #define while ColFg > >> > and > >> >ColBg are in an enum together. > >> >--- > >> >From eefea3c310db3c9460c5fdee3e8a8d0cb45c9819 Mon Sep 17 00:00:00 > >> > 2001 > >> >From: ude > >> >Date: Wed, 14 Mar 2018 10:01:00 -0400 > >> >Subject: [PATCH] ColBorder has been moved to the enum with ColFg > and > >> >ColBg. > >> >--- > >> > drw.h | 2 +- > >> > dwm.c | 1 - > >> > 2 files changed, 1 insertion(+), 2 deletions(-) > >> >diff --git a/drw.h b/drw.h > >> >index 4c67419..4bcd5ad 100644 > >> >--- a/drw.h > >> >+++ b/drw.h > >> >@@ -12,7 +12,7 @@ typedef struct Fnt { > >> > struct Fnt *next; > >> > } Fnt; > >> > > >> >-enum { ColFg, ColBg }; /* Clr scheme index */ > >> >+enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */ > >> > typedef XftColor Clr; > >> > > >> > typedef struct { > >> >diff --git a/dwm.c b/dwm.c > >> >index ec6a27c..ab16c75 100644 > >> >--- a/dwm.c > >> >+++ b/dwm.c > >> >@@ -56,7 +56,6 @@ > >> > #define HEIGHT(X) ((X)->h + 2 * (X)->bw) > >> > #define TAGMASK ((1 << LENGTH(tags)) - 1) > >> > #define TEXTW(X)(drw_fontset_getwidth(drw, (X)) + > >> >lrpad) > >> >-#define ColBorder 2 > >> > > >> > /* enums */ > >> > enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ > >> >-- > >> >2.7.4 > >> > >> Hey, > >> > >> Thanks for your patch. > >> > >> The patch didn't apply for me and your e-mail is changed in the commit. > >> > >> I've fixed this and pushed the commit to master. > >> > >> -- > >> Kind regards, > >> Hiltjo > >> > > > >
Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.
Hi On Wed, Mar 14, 2018 at 5:58 PM, Christopher Drelich wrote: > Any idea what I might have done wrong in creating the patch? I figure > learning now will save us all time in the future. > > I followed the instructions on the website and used a fresh pull of dwm. > Looking at what's in git, it seems the same to me, other than my email as > you noted. You should use git send-email to send your patches by email (this command consumes the output of git format-patch). I just saw that https://suckless.org/hacking does not mention this... Cheers, Silvan > Chris > > On Wed, Mar 14, 2018 at 12:48 PM, Hiltjo Posthuma > wrote: >> >> On Wed, Mar 14, 2018 at 10:12:55AM -0400, Christopher Drelich wrote: >> >My first patch, I'm hoping this is the way you want them submitted. I >> >couldn't find any reason for ColBorder to be a #define while ColFg >> > and >> >ColBg are in an enum together. >> >--- >> >From eefea3c310db3c9460c5fdee3e8a8d0cb45c9819 Mon Sep 17 00:00:00 >> > 2001 >> >From: ude >> >Date: Wed, 14 Mar 2018 10:01:00 -0400 >> >Subject: [PATCH] ColBorder has been moved to the enum with ColFg and >> >ColBg. >> >--- >> > drw.h | 2 +- >> > dwm.c | 1 - >> > 2 files changed, 1 insertion(+), 2 deletions(-) >> >diff --git a/drw.h b/drw.h >> >index 4c67419..4bcd5ad 100644 >> >--- a/drw.h >> >+++ b/drw.h >> >@@ -12,7 +12,7 @@ typedef struct Fnt { >> > struct Fnt *next; >> > } Fnt; >> > >> >-enum { ColFg, ColBg }; /* Clr scheme index */ >> >+enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */ >> > typedef XftColor Clr; >> > >> > typedef struct { >> >diff --git a/dwm.c b/dwm.c >> >index ec6a27c..ab16c75 100644 >> >--- a/dwm.c >> >+++ b/dwm.c >> >@@ -56,7 +56,6 @@ >> > #define HEIGHT(X) ((X)->h + 2 * (X)->bw) >> > #define TAGMASK ((1 << LENGTH(tags)) - 1) >> > #define TEXTW(X)(drw_fontset_getwidth(drw, (X)) + >> >lrpad) >> >-#define ColBorder 2 >> > >> > /* enums */ >> > enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ >> >-- >> >2.7.4 >> >> Hey, >> >> Thanks for your patch. >> >> The patch didn't apply for me and your e-mail is changed in the commit. >> >> I've fixed this and pushed the commit to master. >> >> -- >> Kind regards, >> Hiltjo >> >
Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.
Any idea what I might have done wrong in creating the patch? I figure learning now will save us all time in the future. I followed the instructions on the website and used a fresh pull of dwm. Looking at what's in git, it seems the same to me, other than my email as you noted. Chris On Wed, Mar 14, 2018 at 12:48 PM, Hiltjo Posthuma wrote: > On Wed, Mar 14, 2018 at 10:12:55AM -0400, Christopher Drelich wrote: > >My first patch, I'm hoping this is the way you want them submitted. I > >couldn't find any reason for ColBorder to be a #define while ColFg and > >ColBg are in an enum together. > >--- > >From eefea3c310db3c9460c5fdee3e8a8d0cb45c9819 Mon Sep 17 00:00:00 > 2001 > >From: ude > >Date: Wed, 14 Mar 2018 10:01:00 -0400 > >Subject: [PATCH] ColBorder has been moved to the enum with ColFg and > >ColBg. > >--- > > drw.h | 2 +- > > dwm.c | 1 - > > 2 files changed, 1 insertion(+), 2 deletions(-) > >diff --git a/drw.h b/drw.h > >index 4c67419..4bcd5ad 100644 > >--- a/drw.h > >+++ b/drw.h > >@@ -12,7 +12,7 @@ typedef struct Fnt { > > struct Fnt *next; > > } Fnt; > > > >-enum { ColFg, ColBg }; /* Clr scheme index */ > >+enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */ > > typedef XftColor Clr; > > > > typedef struct { > >diff --git a/dwm.c b/dwm.c > >index ec6a27c..ab16c75 100644 > >--- a/dwm.c > >+++ b/dwm.c > >@@ -56,7 +56,6 @@ > > #define HEIGHT(X) ((X)->h + 2 * (X)->bw) > > #define TAGMASK ((1 << LENGTH(tags)) - 1) > > #define TEXTW(X)(drw_fontset_getwidth(drw, (X)) + > >lrpad) > >-#define ColBorder 2 > > > > /* enums */ > > enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ > >-- > >2.7.4 > > Hey, > > Thanks for your patch. > > The patch didn't apply for me and your e-mail is changed in the commit. > > I've fixed this and pushed the commit to master. > > -- > Kind regards, > Hiltjo > >
Re: [hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.
On Wed, Mar 14, 2018 at 10:12:55AM -0400, Christopher Drelich wrote: >My first patch, I'm hoping this is the way you want them submitted. I >couldn't find any reason for ColBorder to be a #define while ColFg and >ColBg are in an enum together. >--- >From eefea3c310db3c9460c5fdee3e8a8d0cb45c9819 Mon Sep 17 00:00:00 2001 >From: ude >Date: Wed, 14 Mar 2018 10:01:00 -0400 >Subject: [PATCH] ColBorder has been moved to the enum with ColFg and >ColBg. >--- > drw.h | 2 +- > dwm.c | 1 - > 2 files changed, 1 insertion(+), 2 deletions(-) >diff --git a/drw.h b/drw.h >index 4c67419..4bcd5ad 100644 >--- a/drw.h >+++ b/drw.h >@@ -12,7 +12,7 @@ typedef struct Fnt { > struct Fnt *next; > } Fnt; > >-enum { ColFg, ColBg }; /* Clr scheme index */ >+enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */ > typedef XftColor Clr; > > typedef struct { >diff --git a/dwm.c b/dwm.c >index ec6a27c..ab16c75 100644 >--- a/dwm.c >+++ b/dwm.c >@@ -56,7 +56,6 @@ > #define HEIGHT(X) ((X)->h + 2 * (X)->bw) > #define TAGMASK ((1 << LENGTH(tags)) - 1) > #define TEXTW(X)(drw_fontset_getwidth(drw, (X)) + >lrpad) >-#define ColBorder 2 > > /* enums */ > enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ >-- >2.7.4 Hey, Thanks for your patch. The patch didn't apply for me and your e-mail is changed in the commit. I've fixed this and pushed the commit to master. -- Kind regards, Hiltjo
[hackers] [dwm] ColBorder has been moved to the enum with ColFg and ColBg. || Christopher Drelich
commit 3cb34830eb25ebda15a23d8391fd69cddb4fc024 Author: Christopher Drelich AuthorDate: Wed Mar 14 17:44:53 2018 +0100 Commit: Hiltjo Posthuma CommitDate: Wed Mar 14 17:46:48 2018 +0100 ColBorder has been moved to the enum with ColFg and ColBg. diff --git a/drw.h b/drw.h index 4c67419..4bcd5ad 100644 --- a/drw.h +++ b/drw.h @@ -12,7 +12,7 @@ typedef struct Fnt { struct Fnt *next; } Fnt; -enum { ColFg, ColBg }; /* Clr scheme index */ +enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */ typedef XftColor Clr; typedef struct { diff --git a/dwm.c b/dwm.c index ec6a27c..ab16c75 100644 --- a/dwm.c +++ b/dwm.c @@ -56,7 +56,6 @@ #define HEIGHT(X) ((X)->h + 2 * (X)->bw) #define TAGMASK ((1 << LENGTH(tags)) - 1) #define TEXTW(X)(drw_fontset_getwidth(drw, (X)) + lrpad) -#define ColBorder 2 /* enums */ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
[hackers] [dwm][PATCH] ColBorder has been moved to the enum with ColFg and ColBg.
My first patch, I'm hoping this is the way you want them submitted. I couldn't find any reason for ColBorder to be a #define while ColFg and ColBg are in an enum together. --- >From eefea3c310db3c9460c5fdee3e8a8d0cb45c9819 Mon Sep 17 00:00:00 2001 From: ude Date: Wed, 14 Mar 2018 10:01:00 -0400 Subject: [PATCH] ColBorder has been moved to the enum with ColFg and ColBg. --- drw.h | 2 +- dwm.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drw.h b/drw.h index 4c67419..4bcd5ad 100644 --- a/drw.h +++ b/drw.h @@ -12,7 +12,7 @@ typedef struct Fnt { struct Fnt *next; } Fnt; -enum { ColFg, ColBg }; /* Clr scheme index */ +enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */ typedef XftColor Clr; typedef struct { diff --git a/dwm.c b/dwm.c index ec6a27c..ab16c75 100644 --- a/dwm.c +++ b/dwm.c @@ -56,7 +56,6 @@ #define HEIGHT(X) ((X)->h + 2 * (X)->bw) #define TAGMASK ((1 << LENGTH(tags)) - 1) #define TEXTW(X)(drw_fontset_getwidth(drw, (X)) + lrpad) -#define ColBorder 2 /* enums */ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ -- 2.7.4