[wiki] [sites] [dwm][patch][push] Update for current release || Alex Cole

From: <git_AT_suckless.org>
Date: Thu, 12 Nov 2020 05:43:19 +0100

commit d08dd9ceac69a235a23859e134b0cfaa77961246
Author: Alex Cole <ajzcole_AT_airmail.cc>
Date: Thu Nov 12 17:43:34 2020 +1300

    [dwm][patch][push] Update for current release

diff --git a/dwm.suckless.org/patches/push/dwm-push-20201112-61bb8b2.diff b/dwm.suckless.org/patches/push/dwm-push-20201112-61bb8b2.diff
new file mode 100644
index 00000000..c228b666
--- /dev/null
+++ b/dwm.suckless.org/patches/push/dwm-push-20201112-61bb8b2.diff
_AT_@ -0,0 +1,94 @@
+From b2faf234f21e61327ded730024db37bb36635e30 Mon Sep 17 00:00:00 2001
+From: Alex Cole <ajzcole_AT_airmail.cc>
+Date: Thu, 12 Nov 2020 17:36:52 +1300
+Subject: [PATCH] Push patch added
+
+---
+ dwm.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 56 insertions(+)
+
+diff --git a/dwm.c b/dwm.c
+index 664c527..039ab00 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_@ -1209,6 +1212,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_@ -1246,6 +1259,49 @@ propertynotify(XEvent *e)
+ }
+ }
+
++void
++pushdown(const Arg *arg) {
++ Client *sel = selmon->sel, *c;
++
++ if(!sel || sel->isfloating)
++ return;
++ if((c = nexttiled(sel->next))) {
++ detach(sel);
++ sel->next = c->next;
++ c->next = sel;
++ } else {
++ detach(sel);
++ attach(sel);
++ }
++ focus(sel);
++ arrange(selmon);
++}
++
++void
++pushup(const Arg *arg) {
++ Client *sel = selmon->sel, *c;
++
++ if(!sel || sel->isfloating)
++ return;
++ if((c = prevtiled(sel))) {
++ 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 {
++ for(c = sel; c->next; c = c->next);
++ detach(sel);
++ sel->next = NULL;
++ c->next = sel;
++ }
++ focus(sel);
++ arrange(selmon);
++}
++
+ void
+ quit(const Arg *arg)
+ {
+--
+2.29.2
+
diff --git a/dwm.suckless.org/patches/push/index.md b/dwm.suckless.org/patches/push/index.md
index da21208b..b1c103dd 100644
--- a/dwm.suckless.org/patches/push/index.md
+++ b/dwm.suckless.org/patches/push/index.md
_AT_@ -20,6 +20,7 @@ Download
 * [dwm-push-20160731-56a31dc.diff](dwm-push-20160731-56a31dc.diff)
 * [dwm-push-6.0.diff](dwm-push-6.0.diff) (1332b) - 2012/4/6
 * [dwm-push-6.1.diff](dwm-push-6.1.diff) (1402b) - 2014/2/9
+* [dwm-push-20201112-61bb8b2.diff](dwm-push-20201112-61bb8b2.diff) (6.2)
 * [dwm-push\_no\_master-6.0.diff](dwm-push_no_master-6.0.diff)
 * [dwm-push\_no\_master-6.1.diff](dwm-push_no_master-6.1.diff) - 2015/11/21
 * [dwm-push\_no\_master-6.2.diff](dwm-push_no_master-6.2.diff) - 2020/03/08
_AT_@ -31,5 +32,7 @@ This patch seems to be equivalent to the [movestack](../movestack/) patch.
 Author
 ------
 * Unknown?
+* Updated regular version for 6.2 (61bb8b2) Alex Cole <ajzcole_AT_airmail.cc>
 * Updated by Jan Christoph Ebersbach <jceb_AT_e-jc.de>
 * push\_no\_master by Jente Hidskes <jthidskes_AT_outlook.com>
+
Received on Thu Nov 12 2020 - 05:43:19 CET

This archive was generated by hypermail 2.3.0 : Thu Nov 12 2020 - 05:48:50 CET