sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit d10bb59387fa9de545ab94c96a504a6bc0f10be5
parent 4f100a889dff4b21a5c9844934dc1851cecd6eea
Author: Jan Christoph Ebersbach <jceb@e-jc.de>
Date:   Sun,  9 Feb 2014 20:02:14 +0100

update push patch

Diffstat:
Adwm.suckless.org/patches/dwm-6.1-push.diff | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdwm.suckless.org/patches/push.md | 4++--
2 files changed, 68 insertions(+), 2 deletions(-)

diff --git a/dwm.suckless.org/patches/dwm-6.1-push.diff b/dwm.suckless.org/patches/dwm-6.1-push.diff @@ -0,0 +1,66 @@ +URL: http://dwm.suckless.org/patches/push +pushup and pushdown provide a way to move clients inside the clients list. + +Index: dwm/push.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ dwm/push.c 2014-02-09 15:24:21.652117230 +0100 +@@ -0,0 +1,58 @@ ++static Client * ++prevtiled(Client *c) { ++ Client *p, *r; ++ ++ for(p = selmon->clients, r = NULL; p && p != c; p = p->next) ++ if(!p->isfloating && ISVISIBLE(p)) ++ r = p; ++ return r; ++} ++ ++static void ++pushup(const Arg *arg) { ++ Client *sel = selmon->sel; ++ Client *c; ++ ++ if(!sel || sel->isfloating) ++ return; ++ if((c = prevtiled(sel))) { ++ /* attach before c */ ++ detach(sel); ++ sel->next = c; ++ if(selmon->clients == c) ++ selmon->clients = sel; ++ else { ++ for(c = selmon->clients; c->next != sel->next; c = c->next); ++ c->next = sel; ++ } ++ } else { ++ /* move to the end */ ++ for(c = sel; c->next; c = c->next); ++ detach(sel); ++ sel->next = NULL; ++ c->next = sel; ++ } ++ focus(sel); ++ arrange(selmon); ++} ++ ++static void ++pushdown(const Arg *arg) { ++ Client *sel = selmon->sel; ++ Client *c; ++ ++ if(!sel || sel->isfloating) ++ return; ++ if((c = nexttiled(sel->next))) { ++ /* attach after c */ ++ detach(sel); ++ sel->next = c->next; ++ c->next = sel; ++ } else { ++ /* move to the front */ ++ detach(sel); ++ attach(sel); ++ } ++ focus(sel); ++ arrange(selmon); ++} diff --git a/dwm.suckless.org/patches/push.md b/dwm.suckless.org/patches/push.md @@ -15,8 +15,9 @@ ## Download Patches against different versions of dwm are available at -[dwm-clean-patches](https://bitbucket.org/jceb81/dwm-clean-patches/src). +[dwm-clean-patches](https://github.com/jceb/dwm-clean-patches). + * [dwm-6.1-push.diff](dwm-6.1-push.diff) (1402b) (20140209) * [dwm-10e232f9ace7-push.diff](dwm-10e232f9ace7-push.diff) (1332b) (20120406) * [dwm-6.0-push.diff](dwm-6.0-push.diff) (1332b) (20120406) * [dwm-6.0-push_no_master.diff](dwm-6.0-push_no_master.diff) @@ -25,7 +26,6 @@ Patches against different versions of dwm are available at * [push-5.3.c](historical/push-5.3.c) (1K) (20090124) ## Note - This patch seems to be equivalent to the [movestack](movestack) patch. ## Author