[wiki] [sites] Remove obsolete files in dwm-patches-folder || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Sun, 05 Nov 2017 01:49:50 +0100

commit f102ad01523aeec3126f044f0d4d1da3febdf3c1
Author: Laslo Hunhold <dev_AT_frign.de>
Date: Sun Nov 5 01:49:08 2017 +0100

    Remove obsolete files in dwm-patches-folder

diff --git a/dwm.suckless.org/patches/dwm-10e232f9ace7-maximize_vert_horz.diff b/dwm.suckless.org/patches/dwm-10e232f9ace7-maximize_vert_horz.diff
deleted file mode 100644
index eb9f0dd6..00000000
--- a/dwm.suckless.org/patches/dwm-10e232f9ace7-maximize_vert_horz.diff
+++ /dev/null
_AT_@ -1,75 +0,0 @@
-Author: Jan Christoph Ebersbach <jceb_AT_e-jc.de>
-URL: http://dwm.suckless.org/patches/historical/moveresize
-These patches provide helper functions for moving and resizing floating windows
-using keybindings.
-
-diff -r 10e232f9ace7 dwm.c
---- a/dwm.c Sun Mar 25 17:49:35 2012 +0200
-+++ b/dwm.c Fri Apr 06 08:16:26 2012 +0200
-_AT_@ -90,7 +90,7 @@
- int basew, baseh, incw, inch, maxw, maxh, minw, minh;
- int bw, oldbw;
- unsigned int tags;
-- Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
-+ Bool ismax, wasfloating, isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
- Client *next;
- Client *snext;
- Monitor *mon;
-_AT_@ -1155,6 +1155,8 @@
- updatewmhints(c);
- XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
- grabbuttons(c, False);
-+ c->wasfloating = False;
-+ c->ismax = False;
- if(!c->isfloating)
- c->isfloating = c->oldstate = trans != None || c->isfixed;
- if(c->isfloating)
-diff -r 10e232f9ace7 maximize.c
---- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/maximize.c Fri Apr 06 08:16:26 2012 +0200
-_AT_@ -0,0 +1,45 @@
-+void
-+maximize(int x, int y, int w, int h) {
-+ XEvent ev;
-+
-+ if(!selmon->sel || selmon->sel->isfixed)
-+ return;
-+ XRaiseWindow(dpy, selmon->sel->win);
-+ if(!selmon->sel->ismax) {
-+ if(!selmon->lt[selmon->sellt]->arrange || selmon->sel->isfloating)
-+ selmon->sel->wasfloating = True;
-+ else {
-+ togglefloating(NULL);
-+ selmon->sel->wasfloating = False;
-+ }
-+ selmon->sel->oldx = selmon->sel->x;
-+ selmon->sel->oldy = selmon->sel->y;
-+ selmon->sel->oldw = selmon->sel->w;
-+ selmon->sel->oldh = selmon->sel->h;
-+ resize(selmon->sel, x, y, w, h, True);
-+ selmon->sel->ismax = True;
-+ }
-+ else {
-+ resize(selmon->sel, selmon->sel->oldx, selmon->sel->oldy, selmon->sel->oldw, selmon->sel->oldh, True);
-+ if(!selmon->sel->wasfloating)
-+ togglefloating(NULL);
-+ selmon->sel->ismax = False;
-+ }
-+ drawbar(selmon);
-+ while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
-+}
-+
-+void
-+togglemaximize(const Arg *arg) {
-+ maximize(selmon->wx, selmon->wy, selmon->ww - 2 * borderpx, selmon->wh - 2 * borderpx);
-+}
-+
-+void
-+toggleverticalmax(const Arg *arg) {
-+ maximize(selmon->sel->x, selmon->wy, selmon->sel->w, selmon->wh - 2 * borderpx);
-+}
-+
-+void
-+togglehorizontalmax(const Arg *arg) {
-+ maximize(selmon->wx, selmon->sel->y, selmon->ww - 2 * borderpx, selmon->sel->h);
-+}
diff --git a/dwm.suckless.org/patches/dwm-10e232f9ace7-single_window_no_border.diff b/dwm.suckless.org/patches/dwm-10e232f9ace7-single_window_no_border.diff
deleted file mode 100644
index a1bb499d..00000000
--- a/dwm.suckless.org/patches/dwm-10e232f9ace7-single_window_no_border.diff
+++ /dev/null
_AT_@ -1,97 +0,0 @@
-Author: Jan Christoph Ebersbach <jceb_AT_e-jc.de>
-URL: http://dwm.suckless.org/patches/noborder
-This patch removes the border when there is just one window visible in tiled or
-monocle layout.
-
-diff -r 10e232f9ace7 dwm.c
---- a/dwm.c Sun Mar 25 17:49:35 2012 +0200
-+++ b/dwm.c Fri Apr 06 08:16:34 2012 +0200
-_AT_@ -1197,7 +1197,7 @@
-
- void
- monocle(Monitor *m) {
-- unsigned int n = 0;
-+ unsigned int n = 0, r = 0;
- Client *c;
-
- for(c = m->clients; c; c = c->next)
-_AT_@ -1205,8 +1205,17 @@
- n++;
- if(n > 0) /* override layout symbol */
- snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
-- for(c = nexttiled(m->clients); c; c = nexttiled(c->next))
-- resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, False);
-+ for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
-+ /* remove border when in monocle layout */
-+ if(c->bw) {
-+ c->oldbw = c->bw;
-+ c->bw = 0;
-+ r = 1;
-+ }
-+ resize(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw), False);
-+ if(r)
-+ resizeclient(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw));
-+ }
- }
-
- void
-_AT_@ -1722,7 +1731,7 @@
-
- void
- tile(Monitor *m) {
-- unsigned int i, n, h, mw, my, ty;
-+ unsigned int i, n, h, mw, my, ty, r;
- Client *c;
-
- for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-_AT_@ -1733,17 +1742,36 @@
- mw = m->nmaster ? m->ww * m->mfact : 0;
- else
- mw = m->ww;
-- for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
-+ for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++, r = 0) {
-+ if(n == 1) {
-+ if (c->bw) {
-+ /* remove border when only one window is on the current tag */
-+ c->oldbw = c->bw;
-+ c->bw = 0;
-+ r = 1;
-+ }
-+ }
-+ else if(!c->bw && c->oldbw) {
-+ /* restore border when more than one window is displayed */
-+ c->bw = c->oldbw;
-+ c->oldbw = 0;
-+ r = 1;
-+ }
- if(i < m->nmaster) {
- h = (m->wh - my) / (MIN(n, m->nmaster) - i);
- resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), False);
-+ if(r)
-+ resizeclient(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw));
- my += HEIGHT(c);
- }
- else {
- h = (m->wh - ty) / (n - i);
- resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), False);
-+ if(r)
-+ resizeclient(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw));
- ty += HEIGHT(c);
- }
-+ }
- }
-
- void
-_AT_@ -1760,6 +1788,12 @@
- return;
- selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
- if(selmon->sel->isfloating)
-+ /* restore border when moving window into floating mode */
-+ if(!selmon->sel->bw && selmon->sel->oldbw) {
-+ selmon->sel->bw = selmon->sel->oldbw;
-+ selmon->sel->oldbw = 0;
-+ }
-+ if(selmon->sel->isfloating)
- resize(selmon->sel, selmon->sel->x, selmon->sel->y,
- selmon->sel->w, selmon->sel->h, False);
- else if(selmon->sel->isfullscreen)
diff --git a/dwm.suckless.org/patches/dwm-10e232f9ace7-zoomswap.diff b/dwm.suckless.org/patches/dwm-10e232f9ace7-zoomswap.diff
deleted file mode 100644
index c1efd516..00000000
--- a/dwm.suckless.org/patches/dwm-10e232f9ace7-zoomswap.diff
+++ /dev/null
_AT_@ -1,55 +0,0 @@
-Author: Jan Christoph Ebersbach <jceb_AT_e-jc.de>
-URL: http://dwm.suckless.org/patches/zoomswap
-This patch swaps the current window with the previous master when zooming.
-
-diff -r 10e232f9ace7 dwm.c
---- a/dwm.c Sun Mar 25 17:49:35 2012 +0200
-+++ b/dwm.c Fri Apr 06 08:16:47 2012 +0200
-_AT_@ -254,6 +254,7 @@
- static void zoom(const Arg *arg);
-
- /* variables */
-+static Client *prevzoom = NULL;
- static const char broken[] = "broken";
- static char stext[256];
- static int screen;
-_AT_@ -2154,14 +2155,36 @@
- void
- zoom(const Arg *arg) {
- Client *c = selmon->sel;
-+ Client *at, *tmp;
-
- if(!selmon->lt[selmon->sellt]->arrange
- || (selmon->sel && selmon->sel->isfloating))
- return;
-- if(c == nexttiled(selmon->clients))
-- if(!c || !(c = nexttiled(c->next)))
-- return;
-+ if(c == nexttiled(selmon->clients)) {
-+ for(tmp = selmon->clients; tmp && tmp != prevzoom; tmp = tmp->next) ;
-+ if(tmp != prevzoom)
-+ prevzoom = NULL;
-+ if(!c || !(c = nexttiled(prevzoom))) {
-+ c = selmon->sel;
-+ if(!c || !(c = nexttiled(c->next)))
-+ return;
-+ }
-+ }
-+ for(at = selmon->clients; at && at->next && at != c && at->next != c; at = nexttiled(at->next)) ;
- pop(c);
-+ /* swap windows instead of pushing the previous one down */
-+ if(at && at != c) {
-+ /* store c's next neighbor - this window needs to be moved away */
-+ tmp = prevzoom = c->next;
-+ if(c->next != at) {
-+ /* detach c's neighbor from the list of windows */
-+ c->next = tmp->next;
-+ /* attach tmp after c's previous neighbor */
-+ tmp->next = at->next;
-+ at->next = tmp;
-+ arrange(c->mon);
-+ }
-+ }
- }
-
- int
diff --git a/dwm.suckless.org/patches/dwm-3465bed290ab-maximize_vert_horz.diff b/dwm.suckless.org/patches/dwm-3465bed290ab-maximize_vert_horz.diff
deleted file mode 100644
index d4287081..00000000
--- a/dwm.suckless.org/patches/dwm-3465bed290ab-maximize_vert_horz.diff
+++ /dev/null
_AT_@ -1,73 +0,0 @@
-Author: Jan Christoph Ebersbach <jceb_AT_e-jc.de>
-URL: http://dwm.suckless.org/patches/historical/moveresize
-These patches provide helper functions for moving and resizing floating windows
-using keybindings.
-
-Index: dwm/dwm.c
-===================================================================
---- dwm/dwm.c.orig 2014-02-09 15:24:12.552116979 +0100
-+++ dwm/dwm.c 2014-02-09 15:24:12.548116979 +0100
-_AT_@ -92,7 +92,7 @@
- int basew, baseh, incw, inch, maxw, maxh, minw, minh;
- int bw, oldbw;
- unsigned int tags;
-- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
-+ int ismax, wasfloating, isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
- Client *next;
- Client *snext;
- Monitor *mon;
-_AT_@ -1077,6 +1077,8 @@
- updatewmhints(c);
- XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask);
- grabbuttons(c, 0);
-+ c->wasfloating = 0;
-+ c->ismax = 0;
- if (!c->isfloating)
- c->isfloating = c->oldstate = trans != None || c->isfixed;
- if (c->isfloating)
-Index: dwm/maximize.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ dwm/maximize.c 2014-02-09 15:24:12.548116979 +0100
-_AT_@ -0,0 +1,41 @@
-+void
-+maximize(int x, int y, int w, int h) {
-+ XEvent ev;
-+
-+ if(!selmon->sel || selmon->sel->isfixed)
-+ return;
-+ XRaiseWindow(dpy, selmon->sel->win);
-+ if(!selmon->sel->ismax) {
-+ if(!selmon->lt[selmon->sellt]->arrange || selmon->sel->isfloating)
-+ selmon->sel->wasfloating = 1;
-+ else {
-+ togglefloating(NULL);
-+ selmon->sel->wasfloating = 0;
-+ }
-+ resize(selmon->sel, x, y, w, h, 1);
-+ selmon->sel->ismax = 1;
-+ }
-+ else {
-+ resize(selmon->sel, selmon->sel->oldx, selmon->sel->oldy, selmon->sel->oldw, selmon->sel->oldh, 1);
-+ if(!selmon->sel->wasfloating)
-+ togglefloating(NULL);
-+ selmon->sel->ismax = 0;
-+ }
-+ drawbar(selmon);
-+ while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
-+}
-+
-+void
-+togglemaximize(const Arg *arg) {
-+ maximize(selmon->wx, selmon->wy, selmon->ww - 2 * borderpx, selmon->wh - 2 * borderpx);
-+}
-+
-+void
-+toggleverticalmax(const Arg *arg) {
-+ maximize(selmon->sel->x, selmon->wy, selmon->sel->w, selmon->wh - 2 * borderpx);
-+}
-+
-+void
-+togglehorizontalmax(const Arg *arg) {
-+ maximize(selmon->wx, selmon->sel->y, selmon->ww - 2 * borderpx, selmon->sel->h);
-+}
diff --git a/dwm.suckless.org/patches/dwm-6.0-single_tagset_all.diff b/dwm.suckless.org/patches/dwm-6.0-single_tagset_all.diff
deleted file mode 100644
index 16bf02a1..00000000
--- a/dwm.suckless.org/patches/dwm-6.0-single_tagset_all.diff
+++ /dev/null
_AT_@ -1,615 +0,0 @@
-Author: Jan Christoph Ebersbach <jceb_AT_e-jc.de>
-URL: http://dwm.suckless.org/patches/single_tagset
-This patch addresses the multi-monitor setup. Instead of having separate tags
-for every monitor there is just one list of tags for all monitors. Instead of
-moving windows from one monitor to the other, the desired tag from the
-other monitor can just be selected and all windows will be drawn on the
-current monitor.
-
-Several deep changes needed to be made:
-1. Macro ISVISIBLE expects a second parameter, the monitor
-2. Monitor->clients and Monitor->stack were moved to the global variable
- Clientlist cl. All monitors refer to this one list.
-3. A new method attachclients was added. When changing between tags this
- function ensures that all clients are pointing to the right monitor.
-
-Please be aware that this patch probably breaks any other patch!
-
-diff -r 5144eaeed048 dwm.c
---- a/dwm.c Sat Mar 24 18:07:28 2012 +0100
-+++ b/dwm.c Sun Mar 25 11:08:22 2012 +0200
-_AT_@ -45,7 +45,7 @@
- #define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
- #define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \
- * MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy)))
--#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]))
-+#define ISVISIBLE(C, M) ((C->tags & M->tagset[M->seltags]))
- #define LENGTH(X) (sizeof X / sizeof X[0])
- #define MAX(A, B) ((A) > (B) ? (A) : (B))
- #define MIN(A, B) ((A) < (B) ? (A) : (B))
-_AT_@ -126,6 +126,7 @@
- } Layout;
-
- typedef struct Pertag Pertag;
-+typedef struct Clientlist Clientlist;
- struct Monitor {
- char ltsymbol[16];
- float mfact;
-_AT_@ -139,9 +140,8 @@
- unsigned int tagset[2];
- Bool showbar;
- Bool topbar;
-- Client *clients;
-+ Clientlist *cl;
- Client *sel;
-- Client *stack;
- Monitor *next;
- Window barwin;
- const Layout *lt[2];
-_AT_@ -157,6 +157,11 @@
- int monitor;
- } Rule;
-
-+struct Clientlist {
-+ Client *clients;
-+ Client *stack;
-+};
-+
- /* function declarations */
- static void applyrules(Client *c);
- static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact);
-_AT_@ -164,6 +169,7 @@
- static void arrangemon(Monitor *m);
- static void attach(Client *c);
- static void attachabove(Client *c);
-+static void attachclients(Monitor *m);
- static void attachstack(Client *c);
- static void buttonpress(XEvent *e);
- static void checkotherwm(void);
-_AT_@ -206,7 +212,7 @@
- static void monocle(Monitor *m);
- static void motionnotify(XEvent *e);
- static void movemouse(const Arg *arg);
--static Client *nexttiled(Client *c);
-+static Client *nexttiled(Client *c, Monitor *m);
- static void pop(Client *);
- static void propertynotify(XEvent *e);
- static void quit(const Arg *arg);
-_AT_@ -290,6 +296,7 @@
- static DC dc;
- static Monitor *mons = NULL, *selmon = NULL;
- static Window root;
-+static Clientlist *cl;
-
- /* configuration, allows nested code to access above variables */
- #include "config.h"
-_AT_@ -329,7 +336,7 @@
- {
- c->isfloating = r->isfloating;
- c->tags |= r->tags;
-- for(m = mons; m && m->num != r->monitor; m = m->next);
-+ for(m = mons; m && (m->tagset[m->seltags] & c->tags) == 0; m = m->next) ;
- if(m)
- c->mon = m;
- }
-_AT_@ -410,9 +417,9 @@
- void
- arrange(Monitor *m) {
- if(m)
-- showhide(m->stack);
-+ showhide(m->cl->stack);
- else for(m = mons; m; m = m->next)
-- showhide(m->stack);
-+ showhide(m->cl->stack);
- if(m) {
- arrangemon(m);
- restack(m);
-_AT_@ -429,27 +436,60 @@
-
- void
- attach(Client *c) {
-- c->next = c->mon->clients;
-- c->mon->clients = c;
-+ c->next = c->mon->cl->clients;
-+ c->mon->cl->clients = c;
- }
-
- void
- attachabove(Client *c) {
-- if(c->mon->sel == NULL || c->mon->sel == c->mon->clients || c->mon->sel->isfloating) {
-+ if(c->mon->sel == NULL || c->mon->sel == c->mon->cl->clients || c->mon->sel->isfloating) {
- attach(c);
- return;
- }
-
- Client *at;
-- for(at = c->mon->clients; at->next != c->mon->sel; at = at->next);
-+ for(at = c->mon->cl->clients; at->next != c->mon->sel; at = at->next);
- c->next = at->next;
- at->next = c;
- }
-
- void
-+attachclients(Monitor *m) {
-+ /* attach clients to the specified monitor */
-+ Monitor *tm;
-+ Client *c;
-+ unsigned int utags = 0;
-+ Bool rmons = False;
-+ if(!m)
-+ return;
-+
-+ /* collect information about the tags in use */
-+ for(tm = mons; tm; tm = tm->next)
-+ if(tm != m)
-+ utags |= m->tagset[m->seltags];
-+
-+ for(c = m->cl->clients; c; c = c->next)
-+ if(ISVISIBLE(c, m)) {
-+ /* if client is also visible on other tags that are displayed on
-+ * other monitors, remove these tags */
-+ if(c->tags & utags) {
-+ c->tags = c->tags & m->tagset[m->seltags];
-+ rmons = True;
-+ }
-+ unfocus(c, True);
-+ c->mon = m;
-+ }
-+
-+ if(rmons)
-+ for(tm = mons; tm; tm = tm->next)
-+ if(tm != m)
-+ arrange(tm);
-+}
-+
-+void
- attachstack(Client *c) {
-- c->snext = c->mon->stack;
-- c->mon->stack = c;
-+ c->snext = c->mon->cl->stack;
-+ c->mon->cl->stack = c;
- }
-
- void
-_AT_@ -512,8 +552,8 @@
- view(&a);
- selmon->lt[selmon->sellt] = &foo;
- for(m = mons; m; m = m->next)
-- while(m->stack)
-- unmanage(m->stack, False);
-+ while(m->cl->stack)
-+ unmanage(m->cl->stack, False);
- if(dc.font.set)
- XFreeFontSet(dpy, dc.font.set);
- else
-_AT_@ -570,7 +610,7 @@
- || (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen)));
- }
- else if(cme->message_type == netatom[NetActiveWindow]) {
-- if(!ISVISIBLE(c)) {
-+ if(!ISVISIBLE(c, c->mon)) {
- c->mon->seltags ^= 1;
- c->mon->tagset[c->mon->seltags] = c->tags;
- }
-_AT_@ -653,7 +693,7 @@
- c->y = m->my + (m->mh / 2 - HEIGHT(c) / 2); /* center in y direction */
- if((ev->value_mask & (CWX|CWY)) && !(ev->value_mask & (CWWidth|CWHeight)))
- configure(c);
-- if(ISVISIBLE(c))
-+ if(ISVISIBLE(c, m))
- XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
- }
- else
-_AT_@ -674,12 +714,18 @@
-
- Monitor *
- createmon(void) {
-- Monitor *m;
-+ Monitor *m, *tm;
- int i;
-
- if(!(m = (Monitor *)calloc(1, sizeof(Monitor))))
- die("fatal: could not malloc() %u bytes
", sizeof(Monitor));
-- m->tagset[0] = m->tagset[1] = 1;
-+ m->cl = cl;
-+ /* reassing tags when creating a new monitor */
-+ for(i=1, tm = mons; tm; tm = tm->next, i++) {
-+ tm->seltags ^= 1;
-+ tm->tagset[tm->seltags] = i;
-+ }
-+ m->tagset[0] = m->tagset[1] = i;
- m->mfact = mfact;
- m->nmaster = nmaster;
- m->showbar = showbar;
-_AT_@ -721,7 +767,7 @@
- detach(Client *c) {
- Client **tc;
-
-- for(tc = &c->mon->clients; *tc && *tc != c; tc = &(*tc)->next);
-+ for(tc = &c->mon->cl->clients; *tc && *tc != c; tc = &(*tc)->next);
- *tc = c->next;
- }
-
-_AT_@ -729,11 +775,11 @@
- detachstack(Client *c) {
- Client **tc, *t;
-
-- for(tc = &c->mon->stack; *tc && *tc != c; tc = &(*tc)->snext);
-+ for(tc = &c->mon->cl->stack; *tc && *tc != c; tc = &(*tc)->snext);
- *tc = c->snext;
-
- if(c == c->mon->sel) {
-- for(t = c->mon->stack; t && !ISVISIBLE(t); t = t->snext);
-+ for(t = c->mon->cl->stack; t && !ISVISIBLE(t, c->mon); t = t->snext);
- c->mon->sel = t;
- }
- }
-_AT_@ -770,7 +816,7 @@
- unsigned long *col;
- Client *c;
-
-- for(c = m->clients; c; c = c->next) {
-+ for(c = m->cl->clients; c; c = c->next) {
- occ |= c->tags;
- if(c->isurgent)
- urg |= c->tags;
-_AT_@ -886,8 +932,8 @@
-
- void
- focus(Client *c) {
-- if(!c || !ISVISIBLE(c))
-- for(c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
-+ if(!c || !ISVISIBLE(c, selmon))
-+ for(c = selmon->cl->stack; c && !ISVISIBLE(c, selmon); c = c->snext);
- /* was if(selmon->sel) */
- if(selmon->sel && selmon->sel != c)
- unfocus(selmon->sel, False);
-_AT_@ -939,17 +985,17 @@
- if(!selmon->sel)
- return;
- if(arg->i > 0) {
-- for(c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next);
-+ for(c = selmon->sel->next; c && !ISVISIBLE(c, selmon); c = c->next);
- if(!c)
-- for(c = selmon->clients; c && !ISVISIBLE(c); c = c->next);
-+ for(c = selmon->cl->clients; c && !ISVISIBLE(c, selmon); c = c->next);
- }
- else {
-- for(i = selmon->clients; i != selmon->sel; i = i->next)
-- if(ISVISIBLE(i))
-+ for(i = selmon->cl->clients; i != selmon->sel; i = i->next)
-+ if(ISVISIBLE(i, selmon))
- c = i;
- if(!c)
- for(; i; i = i->next)
-- if(ISVISIBLE(i))
-+ if(ISVISIBLE(i, selmon))
- c = i;
- }
- if(c) {
-_AT_@ -1254,12 +1300,12 @@
- unsigned int n = 0, r = 0;
- Client *c;
-
-- for(c = m->clients; c; c = c->next)
-- if(ISVISIBLE(c))
-+ for(c = m->cl->clients; c; c = c->next)
-+ if(ISVISIBLE(c, m))
- n++;
- if(n > 0) /* override layout symbol */
- snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
-- for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
-+ for(c = nexttiled(m->cl->clients, m); c; c = nexttiled(c->next, m)) {
- /* remove border when in monocle layout */
- if(c->bw) {
- c->oldbw = c->bw;
-_AT_@ -1344,8 +1390,8 @@
- }
-
- Client *
--nexttiled(Client *c) {
-- for(; c && (c->isfloating || !ISVISIBLE(c)); c = c->next);
-+nexttiled(Client *c, Monitor *m) {
-+ for(; c && (c->isfloating || !ISVISIBLE(c, m)); c = c->next);
- return c;
- }
-
-_AT_@ -1495,8 +1541,8 @@
- if(m->lt[m->sellt]->arrange) {
- wc.stack_mode = Below;
- wc.sibling = m->barwin;
-- for(c = m->stack; c; c = c->snext)
-- if(!c->isfloating && ISVISIBLE(c)) {
-+ for(c = m->cl->stack; c; c = c->snext)
-+ if(!c->isfloating && ISVISIBLE(c, m)) {
- XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc);
- wc.sibling = c->win;
- }
-_AT_@ -1546,11 +1592,9 @@
- if(c->mon == m)
- return;
- unfocus(c, True);
-- detach(c);
- detachstack(c);
- c->mon = m;
- c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
-- attachabove(c);
- attachstack(c);
- focus(NULL);
- arrange(NULL);
-_AT_@ -1667,6 +1711,8 @@
- sw = DisplayWidth(dpy, screen);
- sh = DisplayHeight(dpy, screen);
- bh = dc.h = dc.font.height + 2;
-+ if(!(cl = (Clientlist *)calloc(1, sizeof(Clientlist))))
-+ die("fatal: could not malloc() %u bytes
", sizeof(Clientlist));
- updategeom();
- /* init atoms */
- wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
-_AT_@ -1717,7 +1763,7 @@
- showhide(Client *c) {
- if(!c)
- return;
-- if(ISVISIBLE(c)) { /* show clients top down */
-+ if(ISVISIBLE(c, c->mon)) { /* show clients top down */
- XMoveWindow(dpy, c->win, c->x, c->y);
- if((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen)
- resize(c, c->x, c->y, c->w, c->h, False);
-_AT_@ -1751,7 +1797,23 @@
-
- void
- tag(const Arg *arg) {
-+ Monitor *m;
-+ unsigned int newtags;
- if(selmon->sel && arg->ui & TAGMASK) {
-+ newtags = arg->ui & TAGMASK;
-+ for(m = mons; m; m = m->next)
-+ /* if tag is visible on another monitor, move client to the new monitor */
-+ if(m != selmon && m->tagset[m->seltags] & newtags) {
-+ /* prevent moving client to all tags (MODKEY-Shift-0) when multiple monitors are connected */
-+ if(newtags & selmon->tagset[selmon->seltags])
-+ return;
-+ /* TODO sendmon? */
-+ selmon->sel->tags = newtags;
-+ selmon->sel->mon = m;
-+ arrange(m);
-+ break;
-+ }
-+ /* workaround in case just one monitor is connected */
- selmon->sel->tags = arg->ui & TAGMASK;
- focus(NULL);
- arrange(selmon);
-_AT_@ -1781,7 +1843,7 @@
- unsigned int i, n, h, mw, my, ty, r;
- Client *c;
-
-- for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ for(n = 0, c = nexttiled(m->cl->clients, m); c; c = nexttiled(c->next, m), n++);
- if(n == 0)
- return;
-
-_AT_@ -1789,7 +1851,7 @@
- mw = m->nmaster ? m->ww * m->mfact : 0;
- else
- mw = m->ww;
-- for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++, r = 0) {
-+ for(i = my = ty = 0, c = nexttiled(m->cl->clients, m); c; c = nexttiled(c->next, m), i++, r = 0) {
- if(n == 1) {
- if (c->bw) {
- /* remove border when only one window is on the current tag */
-_AT_@ -1860,12 +1922,17 @@
-
- void
- toggletag(const Arg *arg) {
-+ Monitor *m;
- unsigned int newtags;
-
- if(!selmon->sel)
- return;
- newtags = selmon->sel->tags ^ (arg->ui & TAGMASK);
- if(newtags) {
-+ /* prevent adding tags that are in use on other monitors */
-+ for(m = mons; m; m = m->next)
-+ if(m != selmon && newtags & m->tagset[m->seltags])
-+ return;
- selmon->sel->tags = newtags;
- focus(NULL);
- arrange(selmon);
-_AT_@ -1874,10 +1941,15 @@
-
- void
- toggleview(const Arg *arg) {
-+ Monitor *m;
- unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK);
- int i;
-
- if(newtagset) {
-+ /* prevent displaying the same tags on multiple monitors */
-+ for(m = mons; m; m = m->next)
-+ if(m != selmon && newtagset & m->tagset[m->seltags])
-+ return;
- if(newtagset == ~0) {
- selmon->pertag->prevtag = selmon->pertag->curtag;
- selmon->pertag->curtag = 0;
-_AT_@ -1896,6 +1968,7 @@
- selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
- selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
- selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1];
-+ attachclients(selmon);
- if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
- togglebar(NULL);
- focus(NULL);
-_AT_@ -2010,8 +2083,10 @@
- if(n <= nn) {
- for(i = 0; i < (nn - n); i++) { /* new monitors available */
- for(m = mons; m && m->next; m = m->next);
-- if(m)
-+ if(m) {
- m->next = createmon();
-+ attachclients(m->next);
-+ }
- else
- mons = createmon();
- }
-_AT_@ -2032,17 +2107,13 @@
- else { /* less monitors available nn < n */
- for(i = nn; i < n; i++) {
- for(m = mons; m && m->next; m = m->next);
-- while(m->clients) {
-- dirty = True;
-- c = m->clients;
-- m->clients = c->next;
-- detachstack(c);
-- c->mon = mons;
-- attachabove(c);
-- attachstack(c);
-- }
- if(m == selmon)
- selmon = mons;
-+ for(c = m->cl->clients; c; c = c->next) {
-+ dirty = True;
-+ if(c->mon == m)
-+ c->mon = selmon;
-+ }
- cleanupmon(m);
- }
- }
-_AT_@ -2183,11 +2254,30 @@
-
- void
- view(const Arg *arg) {
-+ Monitor *m;
-+ unsigned int newtagset = selmon->tagset[selmon->seltags ^ 1];
- int i;
- unsigned int tmptag;
-
- if((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
- return;
-+
-+ /* swap tags when trying to display a tag from another monitor */
-+ if(arg->ui & TAGMASK)
-+ newtagset = arg->ui & TAGMASK;
-+ for(m = mons; m; m = m->next)
-+ if(m != selmon && newtagset & m->tagset[m->seltags]) {
-+ /* prevent displaying all tags (MODKEY-0) when multiple monitors
-+ * are connected */
-+ if(newtagset & selmon->tagset[selmon->seltags])
-+ return;
-+ m->seltags ^= 1;
-+ m->tagset[m->seltags] = selmon->tagset[selmon->seltags];
-+ attachclients(m);
-+ arrange(m);
-+ break;
-+ }
-+
- selmon->seltags ^= 1; /* toggle sel tagset */
- if(arg->ui & TAGMASK) {
- selmon->pertag->prevtag = selmon->pertag->curtag;
-_AT_@ -2208,6 +2298,7 @@
- selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
- selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
- selmon->lt[selmon->sellt^1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt^1];
-+ attachclients(selmon);
- if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
- togglebar(NULL);
- focus(NULL);
-_AT_@ -2220,7 +2311,7 @@
- Monitor *m;
-
- for(m = mons; m; m = m->next)
-- for(c = m->clients; c; c = c->next)
-+ for(c = m->cl->clients; c; c = c->next)
- if(c->win == w)
- return c;
- return NULL;
-_AT_@ -2278,19 +2369,19 @@
- void
- zoom(const Arg *arg) {
- Client *c = selmon->sel;
-- prevclient = selmon->clients;
-+ prevclient = selmon->cl->clients;
- Client *at, *tmp;
-
- if(!selmon->lt[selmon->sellt]->arrange
- || (selmon->sel && selmon->sel->isfloating))
- return;
-- if(c == nexttiled(selmon->clients))
-- if(!c || !(c = nexttiled(prevzoom))) {
-+ if(c == nexttiled(selmon->cl->clients, selmon))
-+ if(!c || !(c = nexttiled(prevzoom, selmon))) {
- c = selmon->sel;
-- if(!c || !(c = nexttiled(c->next)))
-+ if(!c || !(c = nexttiled(c->next, selmon)))
- return;
- }
-- for(at = selmon->clients; at && at->next && at != c && at->next != c; at = nexttiled(at->next)) ;
-+ for(at = selmon->cl->clients; at && at->next && at != c && at->next != c; at = nexttiled(at->next, selmon)) ;
- pop(c);
- /* swap windows instead of pushing the previous one down */
- if(at && at != c) {
-diff -r 5144eaeed048 focusmaster.c
---- a/focusmaster.c Sat Mar 24 18:07:28 2012 +0100
-+++ b/focusmaster.c Sun Mar 25 11:08:22 2012 +0200
-_AT_@ -1,4 +1,4 @@
- static void
- focusmaster(const Arg *arg) {
-- focus(selmon->clients);
-+ focus(selmon->cl->clients);
- }
-diff -r 5144eaeed048 push.c
---- a/push.c Sat Mar 24 18:07:28 2012 +0100
-+++ b/push.c Sun Mar 25 11:08:22 2012 +0200
-_AT_@ -2,8 +2,8 @@
- prevtiled(Client *c) {
- Client *p, *r;
-
-- for(p = selmon->clients, r = NULL; p && p != c; p = p->next)
-- if(!p->isfloating && ISVISIBLE(p))
-+ for(p = selmon->cl->clients, r = NULL; p && p != c; p = p->next)
-+ if(!p->isfloating && ISVISIBLE(p, selmon))
- r = p;
- return r;
- }
-_AT_@ -19,10 +19,10 @@
- /* attach before c */
- detach(sel);
- sel->next = c;
-- if(selmon->clients == c)
-- selmon->clients = sel;
-+ if(selmon->cl->clients == c)
-+ selmon->cl->clients = sel;
- else {
-- for(c = selmon->clients; c->next != sel->next; c = c->next);
-+ for(c = selmon->cl->clients; c->next != sel->next; c = c->next);
- c->next = sel;
- }
- } else {
-_AT_@ -43,7 +43,7 @@
-
- if(!sel || sel->isfloating)
- return;
-- if((c = nexttiled(sel->next))) {
-+ if((c = nexttiled(sel->next, selmon))) {
- /* attach after c */
- detach(sel);
- sel->next = c->next;
-diff -r 5144eaeed048 tagall.c
---- a/tagall.c Sat Mar 24 18:07:28 2012 +0100
-+++ b/tagall.c Sun Mar 25 11:08:22 2012 +0200
-_AT_@ -1,6 +1,6 @@
- void
- tagall(const Arg *arg) {
-- if (!selmon->clients)
-+ if (!selmon->cl->clients)
- return;
- /* if parameter starts with F, just move floating windows */
- int floating_only = (char *)arg->v && ((char *)arg->v)[0] == 'F' ? 1 : 0;
-_AT_@ -8,7 +8,7 @@
- int j;
- Client* c;
- if(tag >= 0 && tag < LENGTH(tags))
-- for(c = selmon->clients; c; c = c->next)
-+ for(c = selmon->cl->clients; c; c = c->next)
- {
- if(!floating_only || c->isfloating)
- for(j = 0; j < LENGTH(tags); j++)
diff --git a/dwm.suckless.org/patches/dwm-6.1-attachaside-tagfix.diff b/dwm.suckless.org/patches/dwm-6.1-attachaside-tagfix.diff
deleted file mode 100644
index e7e105f6..00000000
--- a/dwm.suckless.org/patches/dwm-6.1-attachaside-tagfix.diff
+++ /dev/null
_AT_@ -1,92 +0,0 @@
-diff --git dwm.c dwm.c
-index 169adcb..cd299e0 100644
---- dwm.c
-+++ dwm.c
-_AT_@ -49,7 +49,8 @@
- #define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
- #define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \
- * MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy)))
--#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]))
-+#define ISVISIBLEONTAG(C, T) ((C->tags & T))
-+#define ISVISIBLE(C) ISVISIBLEONTAG(C, C->mon->tagset[C->mon->seltags])
- #define LENGTH(X) (sizeof X / sizeof X[0])
- #define MOUSEMASK (BUTTONMASK|PointerMotionMask)
- #define WIDTH(X) ((X)->w + 2 * (X)->bw)
-_AT_@ -147,6 +148,7 @@ static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool inter
- static void arrange(Monitor *m);
- static void arrangemon(Monitor *m);
- static void attach(Client *c);
-+static void attachaside(Client *c);
- static void attachstack(Client *c);
- static void buttonpress(XEvent *e);
- static void checkotherwm(void);
-_AT_@ -184,6 +186,7 @@ static void maprequest(XEvent *e);
- static void monocle(Monitor *m);
- static void motionnotify(XEvent *e);
- static void movemouse(const Arg *arg);
-+static Client *nexttagged(Client *c);
- static Client *nexttiled(Client *c);
- static void pop(Client *);
- static void propertynotify(XEvent *e);
-_AT_@ -401,6 +404,17 @@ attach(Client *c) {
- }
-
- void
-+attachaside(Client *c) {
-+ Client *at = nexttagged(c);
-+ if(!at) {
-+ attach(c);
-+ return;
-+ }
-+ c->next = at->next;
-+ at->next = c;
-+}
-+
-+void
- attachstack(Client *c) {
- c->snext = c->mon->stack;
- c->mon->stack = c;
-_AT_@ -1050,7 +1064,7 @@ manage(Window w, XWindowAttributes *wa) {
- c->isfloating = c->oldstate = trans != None || c->isfixed;
- if(c->isfloating)
- XRaiseWindow(dpy, c->win);
-- attach(c);
-+ attachaside(c);
- attachstack(c);
- XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
- (unsigned char *) &(c->win), 1);
-_AT_@ -1179,6 +1193,16 @@ movemouse(const Arg *arg) {
- }
-
- Client *
-+nexttagged(Client *c) {
-+ Client *walked = c->mon->clients;
-+ for(;
-+ walked && (walked->isfloating || !ISVISIBLEONTAG(walked, c->tags));
-+ walked = walked->next
-+ );
-+ return walked;
-+}
-+
-+Client *
- nexttiled(Client *c) {
- for(; c && (c->isfloating || !ISVISIBLE(c)); c = c->next);
- return c;
-_AT_@ -1391,7 +1415,7 @@ sendmon(Client *c, Monitor *m) {
- detachstack(c);
- c->mon = m;
- c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
-- attach(c);
-+ attachaside(c);
- attachstack(c);
- focus(NULL);
- arrange(NULL);
-_AT_@ -1827,7 +1851,7 @@ updategeom(void) {
- m->clients = c->next;
- detachstack(c);
- c->mon = mons;
-- attach(c);
-+ attachaside(c);
- attachstack(c);
- }
- if(m == selmon)
diff --git a/dwm.suckless.org/patches/dwm-6.1-nlayouts.diff b/dwm.suckless.org/patches/dwm-6.1-nlayouts.diff
deleted file mode 100644
index 67f79df8..00000000
--- a/dwm.suckless.org/patches/dwm-6.1-nlayouts.diff
+++ /dev/null
_AT_@ -1,50 +0,0 @@
-diff --git a/dwm.c b/dwm.c
-index 7941bd1..5ce4a35 100644
---- a/dwm.c
-+++ b/dwm.c
-_AT_@ -56,6 +56,8 @@
- #define TAGMASK ((1 << LENGTH(tags)) - 1)
- #define TEXTW(X) (textnw(X, strlen(X)) + dc.font.height)
-
-+#define NUM_LAYOUTS 3 /* Change this to the number of layouts defined in config.def.h */
-+
- /* enums */
- enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
- enum { ColBorder, ColFG, ColBG, ColLast }; /* color */
-_AT_@ -143,7 +145,7 @@ struct Monitor {
- Client *stack;
- Monitor *next;
- Window barwin;
-- const Layout *lt[2];
-+ const Layout *lt[NUM_LAYOUTS];
- };
-
- typedef struct {
-_AT_@ -649,6 +651,7 @@ configurerequest(XEvent *e) {
- Monitor *
- createmon(void) {
- Monitor *m;
-+ unsigned int i;
-
- if(!(m = (Monitor *)calloc(1, sizeof(Monitor))))
- die("fatal: could not malloc() %u bytes
", sizeof(Monitor));
-_AT_@ -657,8 +660,8 @@ createmon(void) {
- m->nmaster = nmaster;
- m->showbar = showbar;
- m->topbar = topbar;
-- m->lt[0] = &layouts[0];
-- m->lt[1] = &layouts[1 % LENGTH(layouts)];
-+ for( i = 0; i < LENGTH(layouts); i++ )
-+ m->lt[i] = &layouts[i];
- strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
- return m;
- }
-_AT_@ -1563,7 +1566,7 @@ setfullscreen(Client *c, Bool fullscreen) {
- void
- setlayout(const Arg *arg) {
- if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
-- selmon->sellt ^= 1;
-+ selmon->sellt = (selmon->sellt + 1) % LENGTH(layouts);
- if(arg && arg->v)
- selmon->lt[selmon->sellt] = (Layout *)arg->v;
- strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
diff --git a/dwm.suckless.org/patches/dwm-git-20120406-attachabove.diff b/dwm.suckless.org/patches/dwm-git-20120406-attachabove.diff
deleted file mode 100644
index d38da88a..00000000
--- a/dwm.suckless.org/patches/dwm-git-20120406-attachabove.diff
+++ /dev/null
_AT_@ -1,63 +0,0 @@
-Author: Jan Christoph Ebersbach <jceb_AT_e-jc.de>
-URL: http://dwm.suckless.org/patches/attachabove
-attachabove makes new clients attach above the selected client (instead of
-always becoming the new master) – basically how Xmonad does it.
-
-diff -r 10e232f9ace7 dwm.c
---- a/dwm.c Sun Mar 25 17:49:35 2012 +0200
-+++ b/dwm.c Fri Apr 06 08:16:37 2012 +0200
-_AT_@ -160,6 +160,7 @@
- static void arrange(Monitor *m);
- static void arrangemon(Monitor *m);
- static void attach(Client *c);
-+static void attachabove(Client *c);
- static void attachstack(Client *c);
- static void buttonpress(XEvent *e);
- static void checkotherwm(void);
-_AT_@ -419,6 +420,19 @@
- }
-
- void
-+attachabove(Client *c) {
-+ if(c->mon->sel == NULL || c->mon->sel == c->mon->clients || c->mon->sel->isfloating) {
-+ attach(c);
-+ return;
-+ }
-+
-+ Client *at;
-+ for(at = c->mon->clients; at->next != c->mon->sel; at = at->next);
-+ c->next = at->next;
-+ at->next = c;
-+}
-+
-+void
- attachstack(Client *c) {
- c->snext = c->mon->stack;
- c->mon->stack = c;
-_AT_@ -1159,7 +1173,7 @@
- c->isfloating = c->oldstate = trans != None || c->isfixed;
- if(c->isfloating)
- XRaiseWindow(dpy, c->win);
-- attach(c);
-+ attachabove(c);
- attachstack(c);
- XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
- (unsigned char *) &(c->win), 1);
-_AT_@ -1493,7 +1507,7 @@
- detachstack(c);
- c->mon = m;
- c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
-- attach(c);
-+ attachabove(c);
- attachstack(c);
- focus(NULL);
- arrange(NULL);
-_AT_@ -1939,7 +1953,7 @@
- m->clients = c->next;
- detachstack(c);
- c->mon = mons;
-- attach(c);
-+ attachabove(c);
- attachstack(c);
- }
- if(m == selmon)
diff --git a/dwm.suckless.org/patches/dwm-r35db6d-status2d.diff b/dwm.suckless.org/patches/dwm-r35db6d-status2d.diff
deleted file mode 100644
index fde84dcd..00000000
--- a/dwm.suckless.org/patches/dwm-r35db6d-status2d.diff
+++ /dev/null
_AT_@ -1,201 +0,0 @@
-diff --git a/drw.c b/drw.c
-index b130405..6dcb25d 100644
---- a/drw.c
-+++ b/drw.c
-_AT_@ -224,3 +224,34 @@ drw_cur_free(Drw *drw, Cur *cursor) {
- XFreeCursor(drw->dpy, cursor->cursor);
- free(cursor);
- }
-+
-+void
-+x_set_color(Drw *drw, Clr *color) {
-+ XSetForeground(drw->dpy, drw->gc, color->rgb);
-+}
-+
-+void
-+x_drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h) {
-+ XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
-+}
-+
-+void
-+x_drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, const char *text) {
-+ char buf[256];
-+ int ty, len, olen;
-+ Extnts tex;
-+
-+ olen = strlen(text);
-+ drw_font_getexts(drw->font, text, olen, &tex);
-+ ty = y + (h / 2) - (tex.h / 2) + drw->font->ascent;
-+
-+ len = MIN(olen, sizeof buf);
-+ if(!len)
-+ return;
-+
-+ memcpy(buf, text, len);
-+ if(drw->font->set)
-+ XmbDrawString(drw->dpy, drw->drawable, drw->font->set, drw->gc, x, ty, buf, len);
-+ else
-+ XDrawString(drw->dpy, drw->drawable, drw->gc, x, ty, buf, len);
-+}
-diff --git a/drw.h b/drw.h
-index a5f34e0..e42b897 100644
---- a/drw.h
-+++ b/drw.h
-_AT_@ -38,6 +38,7 @@ typedef struct {
- unsigned int h;
- } Extnts;
-
-+
- /* Drawable abstraction */
- Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
- void drw_resize(Drw *drw, unsigned int w, unsigned int h);
-_AT_@ -67,3 +68,8 @@ void drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, const char
-
- /* Map functions */
- void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h);
-+
-+/* X Basic call */
-+void x_set_color(Drw *drw, Clr *color);
-+void x_drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h);
-+void x_drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, const char *text);
-\ No newline at end of file
-diff --git a/dwm.c b/dwm.c
-index f896170..356394d 100644
---- a/dwm.c
-+++ b/dwm.c
-_AT_@ -162,6 +162,7 @@ static void detach(Client *c);
- static void detachstack(Client *c);
- static Monitor *dirtomon(int dir);
- static void drawbar(Monitor *m);
-+static int drawstatusbar(Monitor *m, int bh, char* text, int xx);
- static void drawbars(void);
- static void enternotify(XEvent *e);
- static void expose(XEvent *e);
-_AT_@ -235,7 +236,7 @@ static void zoom(const Arg *arg);
-
- /* variables */
- static const char broken[] = "broken";
--static char stext[256];
-+static char stext[1024];
- static int screen;
- static int sw, sh; /* X display screen geometry width, height */
- static int bh, blw = 0; /* bar geometry */
-_AT_@ -690,6 +691,100 @@ dirtomon(int dir) {
- return m;
- }
-
-+int
-+drawstatusbar(Monitor *m, int bh, char* stext, int xx) {
-+ int ret, i, w, len, x;
-+ short isCode = 0;
-+ Clr * color = drw->scheme->fg;
-+
-+ len = strlen(stext) + 1 ;
-+ char *text = (char*) malloc(sizeof(char)*len);
-+ char *p = text;
-+ memcpy(text, stext, len);
-+
-+ // compute width of the status text
-+ w = 0;
-+ len = 0;
-+ i = -1;
-+ while(text[++i]) {
-+ if(text[i] != '^' && !isCode) {
-+ ++len;
-+ } else if (text[i] == '^') {
-+ isCode = !isCode;
-+ if(isCode && text[++i] == 'f') {
-+ w += atoi(text + ++i);
-+ }
-+ }
-+ }
-+
-+ w += drw_font_getexts_width(drw->font, text, len);
-+ ret = x = m->ww - w;
-+ if(x < xx) {
-+ ret = x = xx;
-+ w = m->ww - xx;
-+ }
-+
-+ x_set_color(drw, drw->scheme->bg);
-+ x_drw_rect(drw, x, 0, w, bh);
-+ x_set_color(drw, color);
-+
-+ // process status text
-+ i = -1;
-+ while(text[++i]) {
-+ if(text[i] == '^' && !isCode) {
-+ isCode = 1;
-+
-+ // draw text
-+ text[i] = '
Received on Sun Nov 05 2017 - 01:49:50 CET

This archive was generated by hypermail 2.3.0 : Sun Nov 05 2017 - 02:00:20 CET