commit f5f8aea2331ca613cc04c4287feba403c13b6e1e
parent ce4feea06dc7c0c40b687cb667b6fdb1d7126d15
Author: Britton Leo Kerin <britton.kerin@gmail.com>
Date: Sun, 17 Jul 2016 22:12:48 -0800
Merge branch 'master' of git://git.suckless.org/sites
Diffstat:
19 files changed, 405 insertions(+), 503 deletions(-)
diff --git a/dwm.suckless.org/patches/attachabove.md b/dwm.suckless.org/patches/attachabove.md
@@ -4,8 +4,8 @@ attachabove
Description
-----------
-`attachabove` makes new clients attach above the selected client (instead of
-always becoming the new master) - basically how Xmonad does it.
+Make new clients attach above the selected client, instead of
+always becoming the new master. This behaviour is known from Xmonad.
Download
--------
diff --git a/dwm.suckless.org/patches/attachaside.md b/dwm.suckless.org/patches/attachaside.md
@@ -3,9 +3,10 @@ attachaside
Description
-----------
-`attachaside` makes the new client get attached and focused in the stacking
+
+Make new clients get attached and focused in the stacking
area instead of always becoming the new master. It's basically an
-[attachabove](attachabove) mod.
+[attachabove](attachabove) modification.
Original behaviour :
+-----------------+-------+
@@ -44,23 +45,12 @@ area instead of always becoming the new master. It's basically an
Download
--------
-### Version updated to work with tags
-
-The original version of attachaside does does not attach to the stack when
-windows are spawned on a tag that is not currently focused. This version is
-improved to also attach to the stack on unfocused tags.
-
-* [dwm-6.1-attachaside-tagfix.diff](dwm-6.1-attachaside-tagfix.diff) (2.9K) (20150729)
-
-### Original
-
-* [dwm-attachaside-6.0.diff](dwm-attachaside-6.0.diff) (1,6K) (20140412)
-* [dwm-5.7.2-attachaside.diff](historical/dwm-5.7.2-attachaside.diff) (1.1K) (20091215)
-* [dwm-5.6.1-attachaside.diff](historical/dwm-5.6.1-attachaside.diff) (1.1K) (20090915)
+* [dwm-attachaside-6.1.diff](dwm-attachaside-6.1.diff)
+* [dwm-attachaside-20160718-56a31dc.diff](dwm-attachaside-20160718-56a31dc.diff)
Authors
-------
-* Jerome Andrieux - `<jerome at gcu dot info>`
-* Version updated to work with tags by [Chris Down](https://chrisdown.name)
- (cdown) <chris@chrisdown.name>
-* Update to 6.0 by Vladimir Seleznev - `<me at wladmis dot org>`
+
+* Jerome Andrieux - <jerome@gcu.info>
+* Chris Down - <chris@chrisdown.name> (6.1 port and fixes)
+* Laslo Hunhold - <dev@frign.de> (git port)
diff --git a/dwm.suckless.org/patches/autoresize.md b/dwm.suckless.org/patches/autoresize.md
@@ -1,13 +1,21 @@
-# autoresize
+autoresize
+==========
-## Description
+Description
+-----------
-By default, windows that are not visible when requesting a resize/move wont get resized/moved. With this Patch, they do.
+By default, windows that are not visible when requesting a resize/move
+won't get resized/moved. With this patch, they will.
-## Download
+Download
+--------
- * [dwm-autoresize-6.0.diff](dwm-autoresize-6.0.diff) (15.04.2013)
+ * [dwm-autoresize-6.0.diff](dwm-autoresize-6.0.diff)
+ * [dwm-autoresize-6.1.diff](dwm-autoresize-6.1.diff)
+ * [dwm-autoresize-20160718-56a31dc.diff](dwm-autoresize-20160718-56a31dc.diff)
-## Author
+Authors
+-------
* Stefan Mark - <0mark@unserver.de>
+ * Laslo Hunhold - <dev@frign.de> (6.1, git ports)
diff --git a/dwm.suckless.org/patches/azertykey.md b/dwm.suckless.org/patches/azertykey.md
@@ -1,20 +0,0 @@
-# frenchkey
-
-## Description
-
-### En français
-Ce patch a pour but de remplacer les raccourcis par défaut de dwm, qui ne sont pas compatibles avec les claviers azerty (pour les français par exemple).
-En somme, les chiffres 1 2 3 ... 9 0 sont remplacés par le code des touches & é ... ç à.
-
-La touche querty / est quand à elle remplacée par : .
-Ainsi, toutes les fonctions de dwm restent accessibles malgré tout.
-
-Le patch est en fait une simple modification du config.h
-
-### English
-This patch is a config.h modification to use tagging shortcuts with azerty keyboards, which have different layout for numbers and for the key / .
-
-## Download
-
- * [dwm-azertykey.diff](dwm-azertykey.diff) dwm-azertykey.diff (22.04.2011)
-
diff --git a/dwm.suckless.org/patches/better-borders.md b/dwm.suckless.org/patches/better-borders.md
@@ -1,22 +0,0 @@
-better borders
-==============
-
-Description
------------
-
-Like [Ebersbach's patch](http://dwm.suckless.org/patches/noborder), this patch
-removes the border when there is only one window visible, but this patch does
-should automatically work with most other custom layouts with no additiona
-layout-specific changes.
-
-Thanks to Alesandar Metodiev for reporting a bug that lead to the patch being
-rewritten.
-
-Download
---------
-
- * [dwm-better-borders-git-20160702-56a31dc.diff](dwm-better-borders-git-20160702-56a31dc.diff)
-
-Author
-------
- * Eric Pruitt - `<eric dot pruitt at gmail dot com>`
diff --git a/dwm.suckless.org/patches/dwm-attachaside-20160718-56a31dc.diff b/dwm.suckless.org/patches/dwm-attachaside-20160718-56a31dc.diff
@@ -0,0 +1,92 @@
+diff --git a/dwm.c b/dwm.c
+index b2bc9bd..58a86fa 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -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)
+@@ -148,6 +149,7 @@ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interac
+ 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);
+@@ -185,6 +187,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);
+@@ -408,6 +411,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;
+@@ -1079,7 +1093,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);
+@@ -1213,6 +1227,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);
+@@ -1437,7 +1461,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);
+@@ -1890,7 +1914,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-attachaside-6.0.diff b/dwm.suckless.org/patches/dwm-attachaside-6.0.diff
@@ -1,57 +0,0 @@
-diff --git a/dwm.c b/dwm.c
-index 1bbb4b3..b2aa1c8 100644
---- a/dwm.c
-+++ b/dwm.c
-@@ -146,6 +146,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);
-@@ -401,6 +402,17 @@ attach(Client *c) {
- }
-
- void
-+attachaside(Client *c) {
-+ Client *at = nexttiled(c->mon->clients);
-+ if(c->mon->sel == NULL || c->mon->sel->isfloating || !at) {
-+ attach(c);
-+ return;
-+ }
-+ c->next = at->next;
-+ at->next = c;
-+}
-+
-+void
- attachstack(Client *c) {
- c->snext = c->mon->stack;
- c->mon->stack = c;
-@@ -1051,7 +1063,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);
-@@ -1383,7 +1395,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);
-@@ -1818,7 +1830,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-attachaside-6.1.diff b/dwm.suckless.org/patches/dwm-attachaside-6.1.diff
@@ -0,0 +1,92 @@
+diff --git a/dwm.c b/dwm.c
+index 0362114..be7e7a6 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -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)
+@@ -147,6 +148,7 @@ static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interac
+ 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);
+@@ -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);
+@@ -406,6 +409,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;
+@@ -1076,7 +1090,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);
+@@ -1210,6 +1224,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);
+@@ -1434,7 +1458,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);
+@@ -1891,7 +1915,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-autoresize-20160718-56a31dc.diff b/dwm.suckless.org/patches/dwm-autoresize-20160718-56a31dc.diff
@@ -0,0 +1,35 @@
+diff --git a/dwm.c b/dwm.c
+index b2bc9bd..3002925 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -93,7 +93,7 @@ struct Client {
+ int basew, baseh, incw, inch, maxw, maxh, minw, minh;
+ int bw, oldbw;
+ unsigned int tags;
+- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
++ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize;
+ Client *next;
+ Client *snext;
+ Monitor *mon;
+@@ -625,6 +625,8 @@ configurerequest(XEvent *e)
+ configure(c);
+ if (ISVISIBLE(c))
+ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
++ else
++ c->needresize = 1;
+ } else
+ configure(c);
+ } else {
+@@ -1610,6 +1612,12 @@ showhide(Client *c)
+ if (ISVISIBLE(c)) {
+ /* show clients top down */
+ XMoveWindow(dpy, c->win, c->x, c->y);
++ if (c->needresize) {
++ c->needresize = 0;
++ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
++ } else {
++ 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, 0);
+ showhide(c->snext);
diff --git a/dwm.suckless.org/patches/dwm-autoresize-6.0.diff b/dwm.suckless.org/patches/dwm-autoresize-6.0.diff
@@ -1,8 +1,8 @@
diff --git a/dwm.c b/dwm.c
-index e3bf6f4..8a2c646 100644
+index 1d78655..6c61aab 100644
--- a/dwm.c
+++ b/dwm.c
-@@ -91,7 +91,7 @@ struct Client {
+@@ -90,7 +90,7 @@ struct Client {
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int bw, oldbw;
unsigned int tags;
@@ -11,7 +11,7 @@ index e3bf6f4..8a2c646 100644
Client *next;
Client *snext;
Monitor *mon;
-@@ -633,6 +633,8 @@ configurerequest(XEvent *e) {
+@@ -626,6 +626,8 @@ configurerequest(XEvent *e) {
configure(c);
if(ISVISIBLE(c))
XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
@@ -20,7 +20,7 @@ index e3bf6f4..8a2c646 100644
}
else
configure(c);
-@@ -1663,6 +1665,12 @@ showhide(Client *c) {
+@@ -1644,6 +1646,12 @@ showhide(Client *c) {
return;
if(ISVISIBLE(c)) { /* show clients top down */
XMoveWindow(dpy, c->win, c->x, c->y);
diff --git a/dwm.suckless.org/patches/dwm-autoresize-6.1.diff b/dwm.suckless.org/patches/dwm-autoresize-6.1.diff
@@ -0,0 +1,35 @@
+diff --git a/dwm.c b/dwm.c
+index 0362114..e4e8514 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -92,7 +92,7 @@ struct Client {
+ int basew, baseh, incw, inch, maxw, maxh, minw, minh;
+ int bw, oldbw;
+ unsigned int tags;
+- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
++ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, needresize;
+ Client *next;
+ Client *snext;
+ Monitor *mon;
+@@ -621,6 +621,8 @@ configurerequest(XEvent *e)
+ configure(c);
+ if (ISVISIBLE(c))
+ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
++ else
++ c->needresize = 1;
+ } else
+ configure(c);
+ } else {
+@@ -1611,6 +1613,12 @@ showhide(Client *c)
+ if (ISVISIBLE(c)) {
+ /* show clients top down */
+ XMoveWindow(dpy, c->win, c->x, c->y);
++ if (c->needresize) {
++ c->needresize = 0;
++ XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
++ } else {
++ 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, 0);
+ showhide(c->snext);
diff --git a/dwm.suckless.org/patches/dwm-azertykey.diff b/dwm.suckless.org/patches/dwm-azertykey.diff
@@ -1,44 +0,0 @@
-diff -up dwm-5.8.2//config.def.h dwm-5.8.2-fr//config.def.h
---- dwm-5.8.2//config.def.h 2010-06-04 12:39:15.000000000 +0200
-+++ dwm-5.8.2-fr//config.def.h 2011-04-21 08:49:36.000000000 +0200
-@@ -65,21 +65,21 @@ static Key keys[] = {
- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
- { MODKEY, XK_space, setlayout, {0} },
- { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
-- { MODKEY, XK_0, view, {.ui = ~0 } },
-- { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
-+ { MODKEY, XK_agrave, view, {.ui = ~0 } },
-+ { MODKEY|ShiftMask, XK_agrave, tag, {.ui = ~0 } },
- { MODKEY, XK_comma, focusmon, {.i = -1 } },
-- { MODKEY, XK_period, focusmon, {.i = +1 } },
-+ { MODKEY, XK_semicolon, focusmon, {.i = +1 } },
- { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
-- { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
-- TAGKEYS( XK_1, 0)
-- TAGKEYS( XK_2, 1)
-- TAGKEYS( XK_3, 2)
-- TAGKEYS( XK_4, 3)
-- TAGKEYS( XK_5, 4)
-- TAGKEYS( XK_6, 5)
-- TAGKEYS( XK_7, 6)
-- TAGKEYS( XK_8, 7)
-- TAGKEYS( XK_9, 8)
-+ { MODKEY|ShiftMask, XK_semicolon, tagmon, {.i = +1 } },
-+ TAGKEYS( XK_ampersand, 0)
-+ TAGKEYS( XK_eacute, 1)
-+ TAGKEYS( XK_quotedbl, 2)
-+ TAGKEYS( XK_apostrophe, 3)
-+ TAGKEYS( XK_parenleft, 4)
-+ TAGKEYS( XK_minus, 5)
-+ TAGKEYS( XK_egrave, 6)
-+ TAGKEYS( XK_underscore, 7)
-+ TAGKEYS( XK_ccedilla, 8)
- { MODKEY|ShiftMask, XK_q, quit, {0} },
- };
-
-@@ -99,4 +99,3 @@ static Button buttons[] = {
- { ClkTagBar, MODKEY, Button1, tag, {0} },
- { ClkTagBar, MODKEY, Button3, toggletag, {0} },
- };
--
-Seulement dans dwm-5.8.2/: config.def.h.rej
diff --git a/dwm.suckless.org/patches/dwm-better-borders-git-20160702-56a31dc.diff b/dwm.suckless.org/patches/dwm-better-borders-git-20160702-56a31dc.diff
@@ -1,75 +0,0 @@
-Author: Eric Pruitt, https://github.com/ericpruitt/
-Description: This patch disables borders on tiled windows when only one,
-non-floating window is visible.
-
-diff --git a/dwm.c b/dwm.c
-index b2bc9bd..d3e1970 100644
---- a/dwm.c
-+++ b/dwm.c
-@@ -395,9 +395,24 @@ arrange(Monitor *m)
- void
- arrangemon(Monitor *m)
- {
-+ int n = 0;
-+ Client *c;
- strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol);
-- if (m->lt[m->sellt]->arrange)
-- m->lt[m->sellt]->arrange(m);
-+ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if ((m->lt[m->sellt]->arrange != monocle && n > 1) || !m->lt[m->sellt]->arrange) {
-+ for (c = m->clients; c; c = c->next) {
-+ if (ISVISIBLE(c) && (!m->lt[m->sellt]->arrange || !c->isfloating) && (c->bw != borderpx)) {
-+ c->oldbw = c->bw;
-+ c->bw = borderpx;
-+ resizeclient(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw));
-+ }
-+ }
-+ if (m->lt[m->sellt]->arrange) {
-+ m->lt[m->sellt]->arrange(m);
-+ }
-+ } else {
-+ monocle(m);
-+ }
- }
-
- void
-@@ -1126,10 +1141,19 @@ monocle(Monitor *m)
- for (c = m->clients; c; c = c->next)
- if (ISVISIBLE(c))
- n++;
-- if (n > 0) /* override layout symbol */
-+ if (n > 0 && m->lt[m->sellt]->arrange == monocle) /* 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, 0);
-+ for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
-+ // I'm not sure, but calling resize with the border width subtractions
-+ // fixes a glitch where windows would not redraw until they were
-+ // manually resized after restarting dwm.
-+ resize(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw), False);
-+ if (c->bw) {
-+ c->oldbw = c->bw;
-+ c->bw = 0;
-+ resizeclient(c, m->wx, m->wy, m->ww, m->wh);
-+ }
-+ }
- }
-
- void
-@@ -1705,9 +1729,14 @@ togglefloating(const Arg *arg)
- if (selmon->sel->isfullscreen) /* no support for fullscreen windows */
- return;
- selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
-- if (selmon->sel->isfloating)
-+ if (selmon->sel->isfloating) {
-+ if (selmon->sel->bw != borderpx) {
-+ selmon->sel->oldbw = selmon->sel->bw;
-+ selmon->sel->bw = borderpx;
-+ }
- resize(selmon->sel, selmon->sel->x, selmon->sel->y,
-- selmon->sel->w, selmon->sel->h, 0);
-+ selmon->sel->w - selmon->sel->bw * 2, selmon->sel->h - selmon->sel->bw * 2, 0);
-+ }
- arrange(selmon);
- }
-
diff --git a/dwm.suckless.org/patches/dwm-noborder-20160718-56a31dc.diff b/dwm.suckless.org/patches/dwm-noborder-20160718-56a31dc.diff
@@ -0,0 +1,71 @@
+diff --git a/dwm.c b/dwm.c
+index b2bc9bd..d3e1970 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -395,9 +395,24 @@ arrange(Monitor *m)
+ void
+ arrangemon(Monitor *m)
+ {
++ int n = 0;
++ Client *c;
+ strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol);
+- if (m->lt[m->sellt]->arrange)
+- m->lt[m->sellt]->arrange(m);
++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if ((m->lt[m->sellt]->arrange != monocle && n > 1) || !m->lt[m->sellt]->arrange) {
++ for (c = m->clients; c; c = c->next) {
++ if (ISVISIBLE(c) && (!m->lt[m->sellt]->arrange || !c->isfloating) && (c->bw != borderpx)) {
++ c->oldbw = c->bw;
++ c->bw = borderpx;
++ resizeclient(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw));
++ }
++ }
++ if (m->lt[m->sellt]->arrange) {
++ m->lt[m->sellt]->arrange(m);
++ }
++ } else {
++ monocle(m);
++ }
+ }
+
+ void
+@@ -1126,10 +1141,19 @@ monocle(Monitor *m)
+ for (c = m->clients; c; c = c->next)
+ if (ISVISIBLE(c))
+ n++;
+- if (n > 0) /* override layout symbol */
++ if (n > 0 && m->lt[m->sellt]->arrange == monocle) /* 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, 0);
++ for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
++ // I'm not sure, but calling resize with the border width subtractions
++ // fixes a glitch where windows would not redraw until they were
++ // manually resized after restarting dwm.
++ resize(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw), False);
++ if (c->bw) {
++ c->oldbw = c->bw;
++ c->bw = 0;
++ resizeclient(c, m->wx, m->wy, m->ww, m->wh);
++ }
++ }
+ }
+
+ void
+@@ -1705,9 +1729,14 @@ togglefloating(const Arg *arg)
+ if (selmon->sel->isfullscreen) /* no support for fullscreen windows */
+ return;
+ selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
+- if (selmon->sel->isfloating)
++ if (selmon->sel->isfloating) {
++ if (selmon->sel->bw != borderpx) {
++ selmon->sel->oldbw = selmon->sel->bw;
++ selmon->sel->bw = borderpx;
++ }
+ resize(selmon->sel, selmon->sel->x, selmon->sel->y,
+- selmon->sel->w, selmon->sel->h, 0);
++ selmon->sel->w - selmon->sel->bw * 2, selmon->sel->h - selmon->sel->bw * 2, 0);
++ }
+ arrange(selmon);
+ }
+
diff --git a/dwm.suckless.org/patches/dwm-noborder-6.0.diff b/dwm.suckless.org/patches/dwm-noborder-6.0.diff
@@ -1,97 +0,0 @@
-Author: Jan Christoph Ebersbach <jceb@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 ec4baab78314 dwm.c
---- a/dwm.c Mon Dec 19 15:38:30 2011 +0100
-+++ b/dwm.c Fri Apr 06 08:23:31 2012 +0200
-@@ -1191,7 +1191,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)
-@@ -1199,8 +1199,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
-@@ -1703,7 +1712,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++);
-@@ -1714,17 +1723,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
-@@ -1741,6 +1769,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);
- arrange(selmon);
diff --git a/dwm.suckless.org/patches/dwm-noborder-6.1.diff b/dwm.suckless.org/patches/dwm-noborder-6.1.diff
@@ -1,98 +1,70 @@
-Author: Jan Christoph Ebersbach <jceb@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.
-
---- dwm/dwm.c.orig 2015-11-11 19:14:39.771079356 -0800
-+++ dwm/dwm.c 2015-11-11 19:14:42.821079144 -0800
-@@ -1117,7 +1117,7 @@ maprequest(XEvent *e)
+diff --git a/dwm.c b/dwm.c
+index 0362114..e3209e5 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -393,9 +393,24 @@ arrange(Monitor *m)
void
- monocle(Monitor *m)
+ arrangemon(Monitor *m)
{
-- unsigned int n = 0;
-+ unsigned int n = 0, r = 0;
- Client *c;
++ int n = 0;
++ Client *c;
+ strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol);
+- if (m->lt[m->sellt]->arrange)
+- m->lt[m->sellt]->arrange(m);
++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if ((m->lt[m->sellt]->arrange != monocle && n > 1) || !m->lt[m->sellt]->arrange) {
++ for (c = m->clients; c; c = c->next) {
++ if (ISVISIBLE(c) && (!m->lt[m->sellt]->arrange || !c->isfloating) && (c->bw != borderpx)) {
++ c->oldbw = c->bw;
++ c->bw = borderpx;
++ resizeclient(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw));
++ }
++ }
++ if (m->lt[m->sellt]->arrange) {
++ m->lt[m->sellt]->arrange(m);
++ }
++ } else {
++ monocle(m);
++ }
+ }
+ void
+@@ -1123,10 +1138,19 @@ monocle(Monitor *m)
for (c = m->clients; c; c = c->next)
-@@ -1125,8 +1125,17 @@ monocle(Monitor *m)
+ if (ISVISIBLE(c))
n++;
- if (n > 0) /* override layout symbol */
+- if (n > 0) /* override layout symbol */
++ if (n > 0 && m->lt[m->sellt]->arrange == monocle) /* 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, 0);
+ for(c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
-+ /* remove border when in monocle layout */
-+ if(c->bw) {
++ // I'm not sure, but calling resize with the border width subtractions
++ // fixes a glitch where windows would not redraw until they were
++ // manually resized after restarting dwm.
++ resize(c, m->wx, m->wy, m->ww - (2 * c->bw), m->wh - (2 * c->bw), False);
++ 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
-@@ -1666,7 +1675,7 @@ tagmon(const Arg *arg)
- 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++);
-@@ -1677,16 +1686,35 @@ tile(Monitor *m)
- 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++) {
-+ if(n == 1) {
-+ if (c->bw) {
-+ /* remove border when only one window is on the cu rrent 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;
++ resizeclient(c, m->wx, m->wy, m->ww, m->wh);
+ }
- 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), 0);
-+ 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), 0);
-+ if(r)
-+ resizeclient(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw));
- ty += HEIGHT(c);
- }
+ }
}
void
-@@ -1706,9 +1734,15 @@ togglefloating(const Arg *arg)
+@@ -1706,9 +1730,14 @@ togglefloating(const Arg *arg)
if (selmon->sel->isfullscreen) /* no support for fullscreen windows */
return;
selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
- if (selmon->sel->isfloating)
+ 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->bw != borderpx) {
++ selmon->sel->oldbw = selmon->sel->bw;
++ selmon->sel->bw = borderpx;
+ }
resize(selmon->sel, selmon->sel->x, selmon->sel->y,
- selmon->sel->w, selmon->sel->h, 0);
+- selmon->sel->w, selmon->sel->h, 0);
++ selmon->sel->w - selmon->sel->bw * 2, selmon->sel->h - selmon->sel->bw * 2, 0);
+ }
arrange(selmon);
}
diff --git a/dwm.suckless.org/patches/historical/dwm-5.6.1-attachaside.diff b/dwm.suckless.org/patches/historical/dwm-5.6.1-attachaside.diff
@@ -1,38 +0,0 @@
-diff -r 9f79d36bd5e0 dwm.c
---- a/dwm.c Tue Sep 08 13:33:58 2009 +0100
-+++ b/dwm.c Tue Sep 15 14:19:26 2009 +0200
-@@ -153,6 +153,7 @@
- static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact);
- static void arrange(void);
- static void attach(Client *c);
-+static void attachaside(Client *c);
- static void attachstack(Client *c);
- static void buttonpress(XEvent *e);
- static void checkotherwm(void);
-@@ -397,6 +398,17 @@
- }
-
- void
-+attachaside(Client *c) {
-+ Client *at = nexttiled(c->mon->clients);;
-+ if(c->mon->sel == NULL || c->mon->sel->isfloating || !at) {
-+ attach(c);
-+ return;
-+ }
-+ c->next = at->next;
-+ at->next = c;
-+}
-+
-+void
- attachstack(Client *c) {
- c->snext = c->mon->stack;
- c->mon->stack = c;
-@@ -1105,7 +1117,7 @@
- c->isfloating = trans != None || c->isfixed;
- if(c->isfloating)
- XRaiseWindow(dpy, c->win);
-- attach(c);
-+ attachaside(c);
- attachstack(c);
- XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
- XMapWindow(dpy, c->win);
diff --git a/dwm.suckless.org/patches/historical/dwm-5.7.2-attachaside.diff b/dwm.suckless.org/patches/historical/dwm-5.7.2-attachaside.diff
@@ -1,38 +0,0 @@
-diff -r 9f79d36bd5e0 dwm.c
---- a/dwm.c Tue Sep 08 13:33:58 2009 +0100
-+++ b/dwm.c Tue Sep 15 14:19:26 2009 +0200
-@@ -153,6 +153,7 @@
- static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact);
- static void arrange(void);
- static void attach(Client *c);
-+static void attachaside(Client *c);
- static void attachstack(Client *c);
- static void buttonpress(XEvent *e);
- static void checkotherwm(void);
-@@ -397,6 +398,17 @@
- }
-
- void
-+attachaside(Client *c) {
-+ Client *at = nexttiled(c->mon->clients);;
-+ if(c->mon->sel == NULL || c->mon->sel->isfloating || !at) {
-+ attach(c);
-+ return;
-+ }
-+ c->next = at->next;
-+ at->next = c;
-+}
-+
-+void
- attachstack(Client *c) {
- c->snext = c->mon->stack;
- c->mon->stack = c;
-@@ -1105,7 +1117,7 @@
- c->isfloating = trans != None || c->isfixed;
- if(c->isfloating)
- XRaiseWindow(dpy, c->win);
-- attach(c);
-+ attachaside(c);
- attachstack(c);
- XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
- XMapWindow(dpy, c->win);
diff --git a/dwm.suckless.org/patches/noborder.md b/dwm.suckless.org/patches/noborder.md
@@ -3,19 +3,17 @@ noborder
Description
-----------
-This patch removes the border when there is just one window visible in tiled or monocle layout.
-For an alternative that works with most layouts without any layout-specific
-changes, check out [better borders](http://dwm.suckless.org/patches/better-borders).
+Remove the border when there is only one window visible.
Download
--------
-Patches against different versions of dwm are available at
-[dwm-clean-patches](https://github.com/jceb/dwm-clean-patches).
* [dwm-noborder-6.1.diff](dwm-noborder-6.1.diff)
- * [dwm-noborder-6.0.diff](dwm-noborder-6.0.diff)
+ * [dwm-noborder-20160718-56a31dc.diff](dwm-noborder-20160718-56a31dc.diff)
-Author
-------
- * Jan Christoph Ebersbach - `<jceb at e-jc dot de>`
+Authors
+-------
+
+ * Eric Pruitt - <eric.pruitt@gmail.com>
+ * Laslo Hunhold - <dev@frign.de> (6.1, git port)