[wiki] [sites] Add dwm-6.0-tilegap patch || Brandon Mulcahy
commit 22e270bf8e1ff0529323b5ed974b03f74589fcdb
Author: Brandon Mulcahy <brandon_AT_jangler.info>
Date: Tue Jul 7 20:13:13 2015 -0400
Add dwm-6.0-tilegap patch
diff --git a/dwm.suckless.org/patches/dwm-6.0-tilegap.diff b/dwm.suckless.org/patches/dwm-6.0-tilegap.diff
new file mode 100644
index 0000000..dc4344b
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-6.0-tilegap.diff
_AT_@ -0,0 +1,57 @@
+diff --git a/config.def.h b/config.def.h
+index 77ff358..14d2826 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -9,6 +9,7 @@ static const char selbordercolor[] = "#005577";
+ static const char selbgcolor[] = "#005577";
+ static const char selfgcolor[] = "#eeeeee";
+ static const unsigned int borderpx = 1; /* border pixel of windows */
++static const unsigned int gappx = 18; /* gap pixel between windows */
+ static const unsigned int snap = 32; /* snap pixel */
+ static const Bool showbar = True; /* False means no bar */
+ static const Bool topbar = True; /* False means bottom bar */
+diff --git a/dwm.c b/dwm.c
+index 1d78655..41c72ff 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -1703,27 +1703,30 @@ textnw(const char *text, unsigned int len) {
+
+ void
+ tile(Monitor *m) {
+- unsigned int i, n, h, mw, my, ty;
++ unsigned int i, n, h, mw, my, ty, ns;
+ Client *c;
+
+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
+ if(n == 0)
+ return;
+
+- if(n > m->nmaster)
++ if (n > m->nmaster) {
+ mw = m->nmaster ? m->ww * m->mfact : 0;
+- else
++ ns = m->nmaster > 0 ? 2 : 1;
++ } else {
+ mw = m->ww;
+- for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
++ ns = 1;
++ }
++ for(i = 0, my = ty = gappx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
+ 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);
+- my += HEIGHT(c);
++ h = (m->wh - my) / (MIN(n, m->nmaster) - i) - gappx;
++ resize(c, m->wx + gappx, m->wy + my, mw - (2*c->bw) - gappx*(5-ns)/2, h - (2*c->bw), False);
++ my += HEIGHT(c) + gappx;
+ }
+ 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);
+- ty += HEIGHT(c);
++ h = (m->wh - ty) / (n - i) - gappx;
++ resize(c, m->wx + mw + gappx/ns, m->wy + ty, m->ww - mw - (2*c->bw) - gappx*(5-ns)/2, h - (2*c->bw), False);
++ ty += HEIGHT(c) + gappx;
+ }
+ }
+
diff --git a/dwm.suckless.org/patches/tilegap.md b/dwm.suckless.org/patches/tilegap.md
new file mode 100644
index 0000000..18f44d2
--- /dev/null
+++ b/dwm.suckless.org/patches/tilegap.md
_AT_@ -0,0 +1,16 @@
+tilegap
+=======
+
+Description
+-----------
+Window gaps for the tile layout done right (in my humble opinion). The
+same size gap between master and stack, window and window, and window
+and screen edge. Size configurable in config.h.
+
+Download
+--------
+- [dwm-6.0-tilegap.diff](dwm-6.0-tilegap.diff) (948b) (20150707)
+
+Author
+------
+- Brandon Mulcahy - <brandon_AT_jangler.info>
Received on Wed Jul 08 2015 - 02:13:16 CEST
This archive was generated by hypermail 2.3.0
: Wed Jul 08 2015 - 02:24:10 CEST