commit 8aa8a6d0d4d0330e35bf2683f4464f19d4c7cde7
parent 4f14c95cc131495bb2ad7e3b5ebc6e9aa6b28a6a
Author: FRIGN <dev@frign.de>
Date:   Mon, 18 Jul 2016 07:33:51 +0200
dwm noborder patch: remove
Will replace it with the better borders patch, which is less intrusive.
Diffstat:
3 files changed, 0 insertions(+), 217 deletions(-)
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,99 +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.
-
---- 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)
- void
- monocle(Monitor *m)
- {
--	unsigned int n = 0;
-+	unsigned int n = 0, r = 0;
- 	Client *c;
- 
- 	for (c = m->clients; c; c = c->next)
-@@ -1125,8 +1125,17 @@ monocle(Monitor *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))
--		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) {
-+			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;
-+		}
- 		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)
- 	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;
-+		}
- 		resize(selmon->sel, selmon->sel->x, selmon->sel->y,
- 		       selmon->sel->w, selmon->sel->h, 0);
-+	}
- 	arrange(selmon);
- }
- 
diff --git a/dwm.suckless.org/patches/noborder.md b/dwm.suckless.org/patches/noborder.md
@@ -1,21 +0,0 @@
-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).
-
-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)
-
-Author
-------
- * Jan Christoph Ebersbach - `<jceb at e-jc dot de>`