[wiki] [sites] Added tilegap patch for dwm 6.1 || drifter
commit 35492ff59b35bbb35cbcb6993f3e173e1cf8439b
Author: drifter <ctimmers07_AT_gmail.com>
Date: Thu Feb 15 17:35:48 2018 -0500
Added tilegap patch for dwm 6.1
diff --git a/dwm.suckless.org/patches/tilegap/dwm-tilegap-6.1.diff b/dwm.suckless.org/patches/tilegap/dwm-tilegap-6.1.diff
new file mode 100755
index 00000000..1bd1f308
--- /dev/null
+++ b/dwm.suckless.org/patches/tilegap/dwm-tilegap-6.1.diff
_AT_@ -0,0 +1,52 @@
+--- a/config.h 2018-02-15 15:39:21.682625300 -0500
++++ b/config.h 2018-02-15 15:41:19.860058000 -0500
+_AT_@ -3,6 +3,7 @@
+ /* appearance */
+ static const unsigned int borderpx = 1; /* border pixel of windows */
+ static const unsigned int snap = 32; /* snap pixel */
++static const unsigned int gappx = 18; /* gap pixel between windows */
+ static const int showbar = 1; /* 0 means no bar */
+ static const int topbar = 1; /* 0 means bottom bar */
+ static const char *fonts[] = { "monospace:size=10" };
+--- a/dwm.c 2018-02-15 15:39:31.769237600 -0500
++++ b/dwm.c 2018-02-15 15:50:39.404250200 -0500
+_AT_@ -1674,26 +1674,29 @@ tagmon(const Arg *arg)
+ 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), 0);
+- 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), 0);
+- 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;
+ }
+ }
+
Received on Thu Feb 15 2018 - 23:35:51 CET
This archive was generated by hypermail 2.3.0
: Thu Feb 15 2018 - 23:36:23 CET