[dwm] Re: dwm-5.4 stdin; cycle tags
Zitat - Anselm R Garbe * Sa Dez 13 2008 um 17:17 - 2008/12/13 henry atting nspm...@literaturlatenight.de: - A `make clean install' does install dwm but it cannot read from stdin which prevents me from displaying time and date on the toolbar. config.h:15: warning: 'readin' defined but not used See the README file for an example, the status text is set using xsetroot(1) now. Ah, I read this but thought I could do it either way. It works fine with xsetroot. - I found a patch for cycling through tags in this group but it is for dwm-5.2 and apparently does not work for 5.4. How can I set up cycling through tags for 5.4? The tagging approach didn't change between 5.2 and 5.4, so I assume it's just a matter of making the 5.2 patch applying to the 5.4 codebase. Mmh, I am not very familiar with patching, I did it this way: , | do! patch -p1 dwm-5.2-arrownav.diff | missing header for unified diff at line 3 of patch | can't find file to patch at input line 3 | Perhaps you used the wrong -p or --strip option? | The text leading up to this was: | -- | |--- config.def.h Tue Sep 9 15:46:17 2008 | |+++ config.def.h Tue Nov 18 19:26:53 2008 | -- | File to patch: config.def.h | patching file config.def.h | Hunk #1 succeeded at 62 (offset 1 line). | missing header for unified diff at line 14 of patch | can't find file to patch at input line 14 | Perhaps you used the wrong -p or --strip option? | The text leading up to this was: | -- | |--- dwm.c Tue Sep 9 15:46:17 2008 | |+++ dwm.c Tue Nov 18 19:31:55 2008 | -- | File to patch: dwm.c | patching file dwm.c | Hunk #1 succeeded at 197 (offset -1 lines). | Hunk #2 FAILED at 1668. | 1 out of 2 hunks FAILED -- saving rejects to file dwm.c.rej ` cheers, henry dwm.c.rej Description: Binary data
Re: [dwm] Re: dwm-5.4 stdin; cycle tags
2008/12/13 henry atting nspm...@literaturlatenight.de: 2008/12/13 henry atting nspm...@literaturlatenight.de: The tagging approach didn't change between 5.2 and 5.4, so I assume it's just a matter of making the 5.2 patch applying to the 5.4 codebase. Mmh, I am not very familiar with patching, I did it this way: , | do! patch -p1 dwm-5.2-arrownav.diff | missing header for unified diff at line 3 of patch | can't find file to patch at input line 3 | Perhaps you used the wrong -p or --strip option? | The text leading up to this was: | -- | |--- config.def.h Tue Sep 9 15:46:17 2008 | |+++ config.def.h Tue Nov 18 19:26:53 2008 | -- | File to patch: config.def.h | patching file config.def.h | Hunk #1 succeeded at 62 (offset 1 line). | missing header for unified diff at line 14 of patch | can't find file to patch at input line 14 | Perhaps you used the wrong -p or --strip option? | The text leading up to this was: | -- | |--- dwm.c Tue Sep 9 15:46:17 2008 | |+++ dwm.c Tue Nov 18 19:31:55 2008 | -- | File to patch: dwm.c | patching file dwm.c | Hunk #1 succeeded at 197 (offset -1 lines). | Hunk #2 FAILED at 1668. | 1 out of 2 hunks FAILED -- saving rejects to file dwm.c.rej ` Well as I said, you will need to patch it manually, since the lines have changed and the heuristic approach supported by patch(1) isn't succeeding either. Kind regards, --Anselm
Re: [dwm] Re: dwm-5.4 stdin; cycle tags
Zitat - Anselm R Garbe * Sa Dez 13 2008 um 17:54 - 2008/12/13 henry atting nspm...@literaturlatenight.de: 2008/12/13 henry atting nspm...@literaturlatenight.de: The tagging approach didn't change between 5.2 and 5.4, so I assume it's just a matter of making the 5.2 patch applying to the 5.4 codebase. Mmh, I am not very familiar with patching, I did it this way: , | do! patch -p1 dwm-5.2-arrownav.diff | missing header for unified diff at line 3 of patch | can't find file to patch at input line 3 | Perhaps you used the wrong -p or --strip option? | The text leading up to this was: | -- | |--- config.def.h Tue Sep 9 15:46:17 2008 | |+++ config.def.h Tue Nov 18 19:26:53 2008 | -- | File to patch: config.def.h | patching file config.def.h | Hunk #1 succeeded at 62 (offset 1 line). | missing header for unified diff at line 14 of patch | can't find file to patch at input line 14 | Perhaps you used the wrong -p or --strip option? | The text leading up to this was: | -- | |--- dwm.c Tue Sep 9 15:46:17 2008 | |+++ dwm.c Tue Nov 18 19:31:55 2008 | -- | File to patch: dwm.c | patching file dwm.c | Hunk #1 succeeded at 197 (offset -1 lines). | Hunk #2 FAILED at 1668. | 1 out of 2 hunks FAILED -- saving rejects to file dwm.c.rej ` Well as I said, you will need to patch it manually, since the lines have changed and the heuristic approach supported by patch(1) isn't succeeding either. Kind regards, --Anselm I see, great thanks henry
Re: [dwm] Re: dwm-5.4 stdin; cycle tags
On Sat, Dec 13, 2008 at 06:09:11PM +0100, henry atting wrote: Zitat - Anselm R Garbe * Sa Dez 13 2008 um 17:54 - 2008/12/13 henry atting nspm...@literaturlatenight.de: 2008/12/13 henry atting nspm...@literaturlatenight.de: The tagging approach didn't change between 5.2 and 5.4, so I assume it's just a matter of making the 5.2 patch applying to the 5.4 codebase. Mmh, I am not very familiar with patching, I did it this way: , | do! patch -p1 dwm-5.2-arrownav.diff | missing header for unified diff at line 3 of patch | can't find file to patch at input line 3 | Perhaps you used the wrong -p or --strip option? | The text leading up to this was: | -- | |--- config.def.h Tue Sep 9 15:46:17 2008 | |+++ config.def.h Tue Nov 18 19:26:53 2008 | -- | File to patch: config.def.h | patching file config.def.h | Hunk #1 succeeded at 62 (offset 1 line). | missing header for unified diff at line 14 of patch | can't find file to patch at input line 14 | Perhaps you used the wrong -p or --strip option? | The text leading up to this was: | -- | |--- dwm.c Tue Sep 9 15:46:17 2008 | |+++ dwm.c Tue Nov 18 19:31:55 2008 | -- | File to patch: dwm.c | patching file dwm.c | Hunk #1 succeeded at 197 (offset -1 lines). | Hunk #2 FAILED at 1668. | 1 out of 2 hunks FAILED -- saving rejects to file dwm.c.rej ` Well as I said, you will need to patch it manually, since the lines have changed and the heuristic approach supported by patch(1) isn't succeeding either. Kind regards, --Anselm I see, great thanks henry Henry, Attached is an updated arrownav patch [0] that should apply to dwm tip cleanly. [0] http://bsdgroup.org/files/dwm-5.4-arrownav.diff -- James Turner BSD Group Consulting http://www.bsdgroup.org --- config.def.hSat Dec 13 12:39:14 2008 +++ config.def.hSat Dec 13 12:36:21 2008 @@ -62,6 +62,8 @@ static Key keys[] = { { MODKEY, XK_l, setmfact, {.f = +0.05} }, { MODKEY, XK_Return, zoom, {0} }, { MODKEY, XK_Tab,view, {0} }, + { MODKEY, XK_Right, viewnext, {0} }, + { MODKEY, XK_Left, viewprevious, {0} }, { MODKEY|ShiftMask, XK_c, killclient, {0} }, { MODKEY, XK_t, setlayout, {.v = layouts[0]} }, { MODKEY, XK_f, setlayout, {.v = layouts[1]} }, --- dwm.c Sat Dec 13 12:39:15 2008 +++ dwm.c Sat Dec 13 12:38:48 2008 @@ -198,6 +198,8 @@ static void updatestatus(void); static void updatetitle(Client *c); static void updatewmhints(Client *c); static void view(const Arg *arg); +static void viewnext(const Arg *arg); +static void viewprevious(const Arg *arg); static int xerror(Display *dpy, XErrorEvent *ee); static int xerrordummy(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee); @@ -1631,6 +1633,40 @@ view(const Arg *arg) { seltags ^= 1; /* toggle sel tagset */ if(arg-ui TAGMASK) tagset[seltags] = arg-ui TAGMASK; + arrange(); +} + +void +viewnext(const Arg *arg) { + unsigned int i; + + for(i = 0; i LENGTH(tags); i++) { + if((1 i TAGMASK) == tagset[seltags]) { + seltags ^= 1; + if(i == LENGTH(tags) - 1) + tagset[seltags] = 1 0 TAGMASK; + else + tagset[seltags] = 1 (i + 1) TAGMASK; + break; + } + } + arrange(); +} + +void +viewprevious(const Arg *arg) { + unsigned int i; + + for(i = 0; i LENGTH(tags); i++) { + if((1 i TAGMASK) == tagset[seltags]) { + seltags ^= 1; + if(i == 0) + tagset[seltags] = 1 (LENGTH(tags) - 1) TAGMASK; + else + tagset[seltags] = 1 (i - 1) TAGMASK; + break; + } + } arrange(); }
Re: [dwm] Re: dwm-5.4 stdin; cycle tags
Zitat - James Turner * Sa Dez 13 2008 um 18:43 - On Sat, Dec 13, 2008 at 06:09:11PM +0100, henry atting wrote: Zitat - Anselm R Garbe * Sa Dez 13 2008 um 17:54 - 2008/12/13 henry atting nspm...@literaturlatenight.de: 2008/12/13 henry atting nspm...@literaturlatenight.de: The tagging approach didn't change between 5.2 and 5.4, so I assume it's just a matter of making the 5.2 patch applying to the 5.4 codebase. Mmh, I am not very familiar with patching, I did it this way: , | do! patch -p1 dwm-5.2-arrownav.diff | missing header for unified diff at line 3 of patch | can't find file to patch at input line 3 | Perhaps you used the wrong -p or --strip option? | The text leading up to this was: | -- | |--- config.def.h Tue Sep 9 15:46:17 2008 | |+++ config.def.h Tue Nov 18 19:26:53 2008 | -- | File to patch: config.def.h | patching file config.def.h | Hunk #1 succeeded at 62 (offset 1 line). | missing header for unified diff at line 14 of patch | can't find file to patch at input line 14 | Perhaps you used the wrong -p or --strip option? | The text leading up to this was: | -- | |--- dwm.c Tue Sep 9 15:46:17 2008 | |+++ dwm.c Tue Nov 18 19:31:55 2008 | -- | File to patch: dwm.c | patching file dwm.c | Hunk #1 succeeded at 197 (offset -1 lines). | Hunk #2 FAILED at 1668. | 1 out of 2 hunks FAILED -- saving rejects to file dwm.c.rej ` Well as I said, you will need to patch it manually, since the lines have changed and the heuristic approach supported by patch(1) isn't succeeding either. Kind regards, --Anselm I see, great thanks henry Henry, Attached is an updated arrownav patch [0] that should apply to dwm tip cleanly. [0] http://bsdgroup.org/files/dwm-5.4-arrownav.diff Patching works without problems but I get this warnings: dwm.c:1640: warning: ‘viewnext’ defined but not used dwm.c:1657: warning: ‘viewprevious’ defined but not used And, what should I say, it *is* not used ;) henry
Re: [dwm] Re: dwm-5.4 stdin; cycle tags
On Sat, Dec 13, 2008 at 2:26 PM, henry atting nspm...@literaturlatenight.de wrote: Patching works without problems but I get this warnings: dwm.c:1640: warning: 'viewnext' defined but not used dwm.c:1657: warning: 'viewprevious' defined but not used And, what should I say, it *is* not used ;) henry That's because you haven't bound those functions to any keys in your config.h. ;)
[dwm] Re: dwm-5.4 stdin; cycle tags
Zitat - Brendan MacDonell * Sa Dez 13 2008 um 19:42 - On Sat, Dec 13, 2008 at 2:26 PM, henry atting nspm...@literaturlatenight.de wrote: Patching works without problems but I get this warnings: dwm.c:1640: warning: 'viewnext' defined but not used dwm.c:1657: warning: 'viewprevious' defined but not used And, what should I say, it *is* not used ;) henry That's because you haven't bound those functions to any keys in your config.h. ;) Oops, sure! Thanks to all. I'm really glad I switched from awesome to dwm. If I had knewn it before it would have spared me some trouble... henry