123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- --- dwm.c
- +++ dwm.c
- @@ -119,6 +119,10 @@ struct Monitor {
- int by; /* bar geometry */
- int mx, my, mw, mh; /* screen size */
- int wx, wy, ww, wh; /* window area */
- + int gappih; /* horizontal gap between windows */
- + int gappiv; /* vertical gap between windows */
- + int gappoh; /* horizontal outer gaps */
- + int gappov; /* vertical outer gaps */
- unsigned int seltags;
- unsigned int sellt;
- unsigned int tagset[2];
- @@ -637,6 +640,10 @@ createmon(void)
- m->nmaster = nmaster;
- m->showbar = showbar;
- m->topbar = topbar;
- + m->gappih = gappih;
- + m->gappiv = gappiv;
- + m->gappoh = gappoh;
- + m->gappov = gappov;
- m->lt[0] = &layouts[0];
- m->lt[1] = &layouts[1 % LENGTH(layouts)];
- strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
- @@ -1669,32 +1676,6 @@ tagmon(const Arg *arg)
- sendmon(selmon->sel, dirtomon(arg->i));
- }
-
- -void
- -tile(Monitor *m)
- -{
- - unsigned int i, n, h, mw, my, ty;
- - Client *c;
- -
- - for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
- - if (n == 0)
- - return;
- -
- - if (n > m->nmaster)
- - mw = m->nmaster ? m->ww * m->mfact : 0;
- - else
- - mw = m->ww;
- - for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
- - 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->bw), 0);
- - my += HEIGHT(c);
- - } else {
- - h = (m->wh - ty) / (n - i);
- - resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0);
- - ty += HEIGHT(c);
- - }
- -}
- -
- void
- togglebar(const Arg *arg)
- {
|