Introduction
Introduction Statistics Contact Development Disclaimer Help
dwm-gaps-xtile-6.0.diff - sites - public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log
Files
Refs
---
dwm-gaps-xtile-6.0.diff (2842B)
---
1 diff --git a/config.def.h b/config.def.h
2 index ac895db..ef72871 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 = 1; /* 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 5dd2673..2c3268e 100644
15 --- a/dwm.c
16 +++ b/dwm.c
17 @@ -1763,7 +1763,7 @@ void
18 tile(Monitor *m) {
19 Client *c;
20 Area *ga = m->pertag->areas[m->pertag->curtag], *ma = ga + 1, *…
21 - unsigned int n, i, w, h, ms, ss;
22 + unsigned int n, i, w, h, g, ms, ss;
23 float f;
24
25 /* print layout symbols */
26 @@ -1778,23 +1778,24 @@ tile(Monitor *m) {
27 ma->n = MIN(n, m->nmaster), sa->n = n - ma->n;
28 /* calculate area rectangles */
29 f = ma->n == 0 ? 0 : (sa->n == 0 ? 1 : ga->fact / 2);
30 + g = ma->n == 0 || sa->n == 0 ? 0 : gappx;
31 if(ga->dir == DirHor || ga->dir == DirRotHor)
32 - ms = f * m->ww, ss = m->ww - ms,
33 - ma->x = ga->dir == DirHor ? 0 : ss, ma->y = 0, ma->fx =…
34 - sa->x = ga->dir == DirHor ? ms : 0, sa->y = 0, sa->fx =…
35 + ms = f * (m->ww - g), ss = m->ww - ms - g,
36 + ma->x = ga->dir == DirHor ? 0 : ss + g, ma->y = 0, ma->…
37 + sa->x = ga->dir == DirHor ? ms + g: 0, sa->y = 0, sa->f…
38 else
39 - ms = f * m->wh, ss = m->wh - ms,
40 - ma->x = 0, ma->y = ga->dir == DirVer ? 0 : ss, ma->fx =…
41 - sa->x = 0, sa->y = ga->dir == DirVer ? ms : 0, sa->fx =…
42 + ms = f * (m->wh - g), ss = m->wh - ms - g,
43 + ma->x = 0, ma->y = ga->dir == DirVer ? 0 : ss + g, ma->…
44 + sa->x = 0, sa->y = ga->dir == DirVer ? ms + g : 0, sa->…
45 /* tile clients */
46 for(c = nexttiled(m->clients), i = 0; i < n; c = nexttiled(c->n…
47 a = ma->n > 0 ? ma : sa;
48 f = i == 0 || ma->n == 0 ? a->fact : 1, f /= --a->n + f;
49 - w = (a->dir == DirVer ? 1 : f) * (a->fx - a->x);
50 - h = (a->dir == DirHor ? 1 : f) * (a->fy - a->y);
51 + w = a->dir == DirVer ? a->fx - a->x : f * (a->fx - a->x…
52 + h = a->dir == DirHor ? a->fy - a->y : f * (a->fy - a->y…
53 resize(c, m->wx + a->x, m->wy + a->y, w - 2 * c->bw, h …
54 - a->x += a->dir == DirHor ? w : 0;
55 - a->y += a->dir == DirVer ? h : 0;
56 + a->x += a->dir == DirHor ? w + gappx : 0;
57 + a->y += a->dir == DirVer ? h + gappx : 0;
58 }
59 }
60
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.