sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 4946d89409a1a7ee1415e96a0dfebfcebea34d4f
parent 3b0ce8196fdac341520e1b4bb8db9f368213a4af
Author: Moritz Wilhelmy <moritz plus suckless at wzff dot de>
Date:   Sun,  5 Sep 2010 18:52:09 +0200

updated movestack (and movestack wiki site) to work with tip and 5.8.2
Diffstat:
Adwm.suckless.org/patches/movestack-5.8.2.diff | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/movestack.md | 5+++++
2 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/movestack-5.8.2.diff b/dwm.suckless.org/patches/movestack-5.8.2.diff @@ -0,0 +1,76 @@ +diff -r 050d521d66d8 config.def.h +--- a/config.def.h Tue Aug 24 13:13:20 2010 +0100 ++++ b/config.def.h Sun Sep 05 18:43:07 2010 +0200 +@@ -48,6 +48,7 @@ + static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; + static const char *termcmd[] = { "uxterm", NULL }; + ++#include "movestack.c" + static Key keys[] = { + /* modifier key function argument */ + { MODKEY, XK_p, spawn, {.v = dmenucmd } }, +@@ -57,6 +58,8 @@ + { MODKEY, XK_k, focusstack, {.i = -1 } }, + { MODKEY, XK_h, setmfact, {.f = -0.05} }, + { MODKEY, XK_l, setmfact, {.f = +0.05} }, ++ { MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } }, ++ { MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } }, + { MODKEY, XK_Return, zoom, {0} }, + { MODKEY, XK_Tab, view, {0} }, + { MODKEY|ShiftMask, XK_c, killclient, {0} }, +diff -r 050d521d66d8 movestack.c +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/movestack.c Sun Sep 05 18:43:07 2010 +0200 +@@ -0,0 +1,52 @@ ++void ++movestack(const Arg *arg) { ++ Client *c = NULL, *p = NULL, *pc = NULL, *i; ++ Client *sel, *clients; ++ sel = selmon->sel; ++ clients = selmon->clients; ++ ++ if(arg->i > 0) { ++ /* find the client after sel */ ++ for(c = sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); ++ if(!c) ++ for(c = clients; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); ++ ++ } ++ else { ++ /* find the client before sel */ ++ for(i = clients; i != sel; i = i->next) ++ if(ISVISIBLE(i) && !i->isfloating) ++ c = i; ++ if(!c) ++ for(; i; i = i->next) ++ if(ISVISIBLE(i) && !i->isfloating) ++ c = i; ++ } ++ /* find the client before sel and c */ ++ for(i = clients; i && (!p || !pc); i = i->next) { ++ if(i->next == sel) ++ p = i; ++ if(i->next == c) ++ pc = i; ++ } ++ ++ /* swap c and sel clients in the clients list */ ++ if(c && c != sel) { ++ Client *temp = sel->next==c?sel:sel->next; ++ sel->next = c->next==sel?c:c->next; ++ c->next = temp; ++ ++ if(p && p != c) ++ p->next = c; ++ if(pc && pc != sel) ++ pc->next = sel; ++ ++ if(sel == clients) ++ clients = c; ++ else if(c == clients) ++ clients = sel; ++ ++ arrange(selmon); ++ } ++} ++ diff --git a/dwm.suckless.org/patches/movestack.md b/dwm.suckless.org/patches/movestack.md @@ -24,9 +24,14 @@ movestack(-1) will swap the client with the current focus with the previous clie ## Download * [dwm-5.6.1-movestack.diff][1] (2.4k) (20090911) + * [dwm-5.8.2-movestack.diff](movestack-5.8.2.diff) (20100905) ## Author * Niki Yoshiuchi - <aplusbi@gmail.com> +## Contributors + + * Moritz Wilhelmy (fix to work with dwm 5.8) - <moritz plus suckless at wzff dot de> + [1]: http://www.aplusbi.com/projects/dwm/dwm-5.6.1-movestack.diff