Introduction
Introduction Statistics Contact Development Disclaimer Help
dwm-tilegap-6.0.diff - sites - public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log
Files
Refs
---
dwm-tilegap-6.0.diff (2053B)
---
1 diff --git a/config.def.h b/config.def.h
2 index 77ff358..14d2826 100644
3 --- a/config.def.h
4 +++ b/config.def.h
5 @@ -9,6 +9,7 @@ static const char selbordercolor[] = "#005577";
6 static const char selbgcolor[] = "#005577";
7 static const char selfgcolor[] = "#eeeeee";
8 static const unsigned int borderpx = 1; /* border pixel of wind…
9 +static const unsigned int gappx = 18; /* gap pixel between wi…
10 static const unsigned int snap = 32; /* snap pixel */
11 static const Bool showbar = True; /* False means no bar */
12 static const Bool topbar = True; /* False means bottom b…
13 diff --git a/dwm.c b/dwm.c
14 index 1d78655..41c72ff 100644
15 --- a/dwm.c
16 +++ b/dwm.c
17 @@ -1703,27 +1703,30 @@ textnw(const char *text, unsigned int len) {
18
19 void
20 tile(Monitor *m) {
21 - unsigned int i, n, h, mw, my, ty;
22 + unsigned int i, n, h, mw, my, ty, ns;
23 Client *c;
24
25 for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)…
26 if(n == 0)
27 return;
28
29 - if(n > m->nmaster)
30 + if (n > m->nmaster) {
31 mw = m->nmaster ? m->ww * m->mfact : 0;
32 - else
33 + ns = m->nmaster > 0 ? 2 : 1;
34 + } else {
35 mw = m->ww;
36 - for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttile…
37 + ns = 1;
38 + }
39 + for(i = 0, my = ty = gappx, c = nexttiled(m->clients); c; c = n…
40 if(i < m->nmaster) {
41 - h = (m->wh - my) / (MIN(n, m->nmaster) - i);
42 - resize(c, m->wx, m->wy + my, mw - (2*c->bw), h …
43 - my += HEIGHT(c);
44 + h = (m->wh - my) / (MIN(n, m->nmaster) - i) - g…
45 + resize(c, m->wx + gappx, m->wy + my, mw - (2*c-…
46 + my += HEIGHT(c) + gappx;
47 }
48 else {
49 - h = (m->wh - ty) / (n - i);
50 - resize(c, m->wx + mw, m->wy + ty, m->ww - mw - …
51 - ty += HEIGHT(c);
52 + h = (m->wh - ty) / (n - i) - gappx;
53 + resize(c, m->wx + mw + gappx/ns, m->wy + ty, m-…
54 + ty += HEIGHT(c) + gappx;
55 }
56 }
57
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.