[hackers] [sites] push-5.6 || nsz

From: <hg_AT_suckless.org>
Date: Sun, 16 Aug 2009 10:54:18 +0000 (UTC)

changeset: 135:80780fd19baa
user: nsz <nszabolcs_AT_gmail.com>
date: Thu Jul 09 21:32:16 2009 +0200
files: dwm.suckless.org/patches/push-5.6.c dwm.suckless.org/patches/push.md
description:
push-5.6

diff -r 6a42694480cd -r 80780fd19baa dwm.suckless.org/patches/push-5.6.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/push-5.6.c Thu Jul 09 21:32:16 2009 +0200
@@ -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();
+}
+
+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();
+}
diff -r 6a42694480cd -r 80780fd19baa dwm.suckless.org/patches/push.md
--- a/dwm.suckless.org/patches/push.md Thu Jul 09 20:03:14 2009 +0100
+++ b/dwm.suckless.org/patches/push.md Thu Jul 09 21:32:16 2009 +0200
@@ -4,12 +4,13 @@
 
 This patch provides a way to move clients position inside the clients list.
 
- #include "push-5.3.c"
+ #include "push-5.6.c"
 
- { MODKEY|ControlMask, XK_j, pushdown, NULL }, \
- { MODKEY|ControlMask, XK_k, pushup, NULL }, \
+ { MODKEY|ControlMask, XK_j, pushdown, NULL },
+ { MODKEY|ControlMask, XK_k, pushup, NULL },
 
 ## Download
 
- * [push-5.3.c](push-5.3.c) (2K) (20090124)
+ * [push-5.6.c](push-5.6.c) (1K) (20090709)
+ * [push-5.3.c](push-5.3.c) (1K) (20090124)
 
Received on Sun Aug 16 2009 - 10:54:18 UTC

This archive was generated by hypermail 2.2.0 : Sun Aug 16 2009 - 14:20:01 UTC