feat: nomonocleborders

This commit is contained in:
ktyl 2025-01-21 21:24:46 +00:00
parent 348c914197
commit b27996517a
2 changed files with 13 additions and 0 deletions

12
dwm.c
View File

@ -327,6 +327,12 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact)
int baseismin; int baseismin;
Monitor *m = c->mon; Monitor *m = c->mon;
// return 1 if layout is monocle
if (&monocle == c->mon->lt[c->mon->sellt]->arrange)
{
return 1;
}
/* set minimum possible */ /* set minimum possible */
*w = MAX(1, *w); *w = MAX(1, *w);
*h = MAX(1, *h); *h = MAX(1, *h);
@ -1313,6 +1319,12 @@ resizeclient(Client *c, int x, int y, int w, int h)
c->oldw = c->w; c->w = wc.width = w; c->oldw = c->w; c->w = wc.width = w;
c->oldh = c->h; c->h = wc.height = h; c->oldh = c->h; c->h = wc.height = h;
wc.border_width = c->bw; wc.border_width = c->bw;
if ((&monocle == c->mon->lt[c->mon->sellt]->arrange) && (!c->isfloating))
{
wc.border_width = 0;
c->w = wc.width += c->bw * 2;
c->h = wc.height += c->bw * 2;
}
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
configure(c); configure(c);
XSync(dpy, False); XSync(dpy, False);

1
patches/other.txt Normal file
View File

@ -0,0 +1 @@
nomonocleborders https://gist.github.com/SebastianJarsve/497b2014774c849df0132d7118cbab65