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.h Sat Dec 13 12:39:14 2008 +++ config.def.h Sat 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(); }