feat: nomonocleborders
This commit is contained in:
parent
348c914197
commit
b27996517a
12
dwm.c
12
dwm.c
|
@ -327,6 +327,12 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact)
|
|||
int baseismin;
|
||||
Monitor *m = c->mon;
|
||||
|
||||
// return 1 if layout is monocle
|
||||
if (&monocle == c->mon->lt[c->mon->sellt]->arrange)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* set minimum possible */
|
||||
*w = MAX(1, *w);
|
||||
*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->oldh = c->h; c->h = wc.height = h;
|
||||
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);
|
||||
configure(c);
|
||||
XSync(dpy, False);
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
nomonocleborders https://gist.github.com/SebastianJarsve/497b2014774c849df0132d7118cbab65
|
Loading…
Reference in New Issue