[wiki] [sites] [dwm][PATCH] update push_no_master patch for 6.1 || Matt Boswell

From: <git_AT_suckless.org>
Date: Sat, 21 Nov 2015 22:57:42 +0100

commit edf5874b43b55c152b18ac3f97175b72667c721f
Author: Matt Boswell <mordervomubel+gitlab_AT_lockmail.us>
Date: Sat Nov 21 16:54:42 2015 -0500

    [dwm][PATCH] update push_no_master patch for 6.1
    
    Also remove old versions of push.

diff --git a/dwm.suckless.org/patches/dwm-6.1-push_no_master.diff b/dwm.suckless.org/patches/dwm-6.1-push_no_master.diff
new file mode 100644
index 0000000..d13a52b
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-6.1-push_no_master.diff
_AT_@ -0,0 +1,70 @@
+diff --git a/dwm.c b/dwm.c
+index 0362114..d61d736 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -186,7 +186,10 @@ static void motionnotify(XEvent *e);
+ static void movemouse(const Arg *arg);
+ static Client *nexttiled(Client *c);
+ static void pop(Client *);
++static Client *prevtiled(Client *c);
+ static void propertynotify(XEvent *e);
++static void pushdown(const Arg *arg);
++static void pushup(const Arg *arg);
+ static void quit(const Arg *arg);
+ static Monitor *recttomon(int x, int y, int w, int h);
+ static void resize(Client *c, int x, int y, int w, int h, int interact);
+_AT_@ -1225,6 +1228,16 @@ pop(Client *c)
+ arrange(c->mon);
+ }
+
++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;
++}
++
+ void
+ propertynotify(XEvent *e)
+ {
+_AT_@ -1263,6 +1276,37 @@ propertynotify(XEvent *e)
+ }
+
+ void
++pushdown(const Arg *arg) {
++ Client *sel = selmon->sel, *c;
++
++ if(!sel || sel->isfloating || sel == nexttiled(selmon->clients))
++ return;
++ if((c = nexttiled(sel->next))) {
++ detach(sel);
++ sel->next = c->next;
++ c->next = sel;
++ }
++ focus(sel);
++ arrange(selmon);
++}
++
++void
++pushup(const Arg *arg) {
++ Client *sel = selmon->sel, *c;
++
++ if(!sel || sel->isfloating)
++ return;
++ if((c = prevtiled(sel)) && c != nexttiled(selmon->clients)) {
++ detach(sel);
++ sel->next = c;
++ for(c = selmon->clients; c->next != sel->next; c = c->next);
++ c->next = sel;
++ }
++ focus(sel);
++ arrange(selmon);
++}
++
++void
+ quit(const Arg *arg)
+ {
+ running = 0;
diff --git a/dwm.suckless.org/patches/push.md b/dwm.suckless.org/patches/push.md
index 0b54ffd..a7fc4a2 100644
--- a/dwm.suckless.org/patches/push.md
+++ b/dwm.suckless.org/patches/push.md
_AT_@ -17,13 +17,10 @@
 Patches against different versions of dwm are available at
 [dwm-clean-patches](https://github.com/jceb/dwm-clean-patches).
 
- * [dwm-6.1-push.diff](dwm-6.1-push.diff) (1402b) (20140209)
- * [dwm-git-20120406-push.diff](dwm-git-20120406-push.diff) (1332b)
- * [dwm-6.0-push.diff](dwm-6.0-push.diff) (1332b) (20120406)
+ * [dwm-6.0-push.diff](dwm-6.0-push.diff) (1332b) - 2012/4/6
  * [dwm-6.0-push_no_master.diff](dwm-6.0-push_no_master.diff)
- * [push-5.7.1.c](historical/push-5.7.1.c) (20090927)
- * [push-5.6.c](historical/push-5.6.c) (1K) (20090709)
- * [push-5.3.c](historical/push-5.3.c) (1K) (20090124)
+ * [dwm-6.1-push.diff](dwm-6.1-push.diff) (1402b) - 2014/2/9
+ * [dwm-6.1-push_no_master.diff](dwm-6.1-push_no_master.diff) - 2015/11/21
 
 ## Note
 This patch seems to be equivalent to the [movestack](movestack) patch.
Received on Sat Nov 21 2015 - 22:57:42 CET

This archive was generated by hypermail 2.3.0 : Sat Nov 21 2015 - 23:00:13 CET