tHide borders in monocle mode and for single windows in tile mode - dwm - [fork… | |
git clone git://src.adamsgaard.dk/dwm | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 780ed03b1549e121e1e32d4b8847ecbe4886b295 | |
parent 7c3dd978316b8869a34163e9679fd7fe8c08ad20 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 18 Jun 2020 10:58:21 +0200 | |
Hide borders in monocle mode and for single windows in tile mode | |
Diffstat: | |
M dwm.c | 14 ++++++++++---- | |
1 file changed, 10 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/dwm.c b/dwm.c | |
t@@ -1173,7 +1173,8 @@ monocle(Monitor *m) | |
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, … | |
+ resize(c, m->wx - borderpx, m->wy - borderpx, | |
+ m->ww, m->wh, 0); | |
} | |
void | |
t@@ -1734,26 +1735,31 @@ tagmon(const Arg *arg) | |
void | |
tile(Monitor *m) | |
{ | |
- unsigned int i, n, h, mw, my, ty; | |
+ unsigned int i, n, h, mw, my, ty, bw = borderpx; | |
Client *c; | |
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); | |
if (n == 0) | |
return; | |
+ if (n == 1) | |
+ bw = 0; | |
+ | |
if (n > m->nmaster) | |
mw = m->nmaster ? m->ww * m->mfact : 0; | |
else | |
mw = m->ww; | |
for (i = 0, my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c… | |
+ | |
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-… | |
+ resize(c, m->wx - (borderpx - bw), m->wy + my - (borde… | |
+ mw - 2*bw, h - 2*bw, 0); | |
if (my + HEIGHT(c) < m->wh) | |
my += HEIGHT(c); | |
} else { | |
h = (m->wh - ty) / (n - i); | |
- resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->b… | |
+ resize(c, m->wx + mw, m->wy + ty, m->ww - mw - 2*bw, h… | |
if (ty + HEIGHT(c) < m->wh) | |
ty += HEIGHT(c); | |
} |