Update suckless config
This commit is contained in:
@@ -2175,13 +2175,19 @@ centeredmaster(Monitor *m)
|
||||
|
||||
/* count number of clients in the selected monitor */
|
||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
|
||||
|
||||
if (n == 0)
|
||||
return;
|
||||
if(n == 1){
|
||||
c = nexttiled(m->clients);
|
||||
resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* initialize areas */
|
||||
mw = m->ww;
|
||||
mx = 0;
|
||||
my = 0;
|
||||
my = m->gappx;
|
||||
tw = mw;
|
||||
|
||||
if (n > m->nmaster) {
|
||||
@@ -2196,28 +2202,31 @@ centeredmaster(Monitor *m)
|
||||
}
|
||||
}
|
||||
|
||||
oty = 0;
|
||||
ety = 0;
|
||||
oty = m->gappx;
|
||||
ety = m->gappx;
|
||||
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
||||
if (i < m->nmaster) {
|
||||
/* nmaster clients are stacked vertically, in the center
|
||||
* of the screen */
|
||||
h = (m->wh - my) / (MIN(n, m->nmaster) - i);
|
||||
resize(c, m->wx + mx, m->wy + my, mw - (2*c->bw),
|
||||
h - (2*c->bw), 0);
|
||||
my += HEIGHT(c);
|
||||
if(m->nmaster >= n)
|
||||
resize(c, m->wx + mx + m->gappx, m->wy + my, mw - 2*(c->bw + m->gappx),
|
||||
h - (2*c->bw) - m->gappx, 0);
|
||||
else if(m->nmaster + 1 < n)
|
||||
resize(c, m->wx + mx + m->gappx/2, m->wy + my, mw - 2*c->bw - m->gappx, h - 2*c->bw - m->gappx, 0);
|
||||
else
|
||||
resize(c, m->wx + mx + m->gappx, m->wy + my, mw - 2*c->bw - m->gappx*3/2, h - 2*c->bw - m->gappx, 0);
|
||||
my += HEIGHT(c) + m->gappx;
|
||||
} else {
|
||||
/* stack clients are stacked vertically */
|
||||
if ((i - m->nmaster) % 2 ) {
|
||||
if ((i - m->nmaster) % 2) {
|
||||
h = (m->wh - ety) / ( (1 + n - i) / 2);
|
||||
resize(c, m->wx, m->wy + ety, tw - (2*c->bw),
|
||||
h - (2*c->bw), 0);
|
||||
ety += HEIGHT(c);
|
||||
resize(c, m->wx + m->gappx, m->wy + ety, tw - (2*c->bw) - m->gappx*3/2, h - 2*c->bw - m->gappx, 0);
|
||||
ety += HEIGHT(c) + m->gappx;
|
||||
} else {
|
||||
h = (m->wh - oty) / ((1 + n - i) / 2);
|
||||
resize(c, m->wx + mx + mw, m->wy + oty,
|
||||
tw - (2*c->bw), h - (2*c->bw), 0);
|
||||
oty += HEIGHT(c);
|
||||
resize(c, m->wx + mx + mw + m->gappx/2, m->wy + oty, tw - (2*c->bw) - m->gappx*3/2, h - 2*c->bw - m->gappx, 0);
|
||||
oty += HEIGHT(c) + m->gappx;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2232,6 +2241,11 @@ centeredfloatingmaster(Monitor *m)
|
||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
|
||||
if (n == 0)
|
||||
return;
|
||||
if(n == 1){
|
||||
c = nexttiled(m->clients);
|
||||
resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* initialize nmaster area */
|
||||
if (n > m->nmaster) {
|
||||
@@ -2243,29 +2257,31 @@ centeredfloatingmaster(Monitor *m)
|
||||
mh = m->nmaster ? m->wh * m->mfact : 0;
|
||||
mw = m->nmaster ? m->ww * 0.9 : 0;
|
||||
}
|
||||
mx = mxo = (m->ww - mw) / 2;
|
||||
mx = mxo = (m->ww - mw + m->gappx) / 2;
|
||||
my = myo = (m->wh - mh) / 2;
|
||||
} else {
|
||||
/* go fullscreen if all clients are in the master area */
|
||||
mh = m->wh;
|
||||
mw = m->ww;
|
||||
mx = mxo = 0;
|
||||
mx = m->gappx;
|
||||
mxo = 0;
|
||||
my = myo = 0;
|
||||
}
|
||||
|
||||
for(i = tx = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
||||
tx = m->gappx;
|
||||
for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
||||
if (i < m->nmaster) {
|
||||
/* nmaster clients are stacked horizontally, in the center
|
||||
* of the screen */
|
||||
w = (mw + mxo - mx) / (MIN(n, m->nmaster) - i);
|
||||
resize(c, m->wx + mx, m->wy + my, w - (2*c->bw),
|
||||
mh - (2*c->bw), 0);
|
||||
mx += WIDTH(c);
|
||||
w = (mw + mxo - mx) / (MIN(n, m->nmaster) - i) + m->gappx;
|
||||
resize(c, m->wx + mx, m->wy + my + m->gappx, w - 2*(c->bw + m->gappx),
|
||||
mh - 2*(c->bw + m->gappx), 0);
|
||||
mx += WIDTH(c) + m->gappx;
|
||||
} else {
|
||||
/* stack clients are stacked horizontally */
|
||||
w = (m->ww - tx) / (n - i);
|
||||
resize(c, m->wx + tx, m->wy, w - (2*c->bw),
|
||||
m->wh - (2*c->bw), 0);
|
||||
tx += WIDTH(c);
|
||||
w = (m->ww - tx) / (n - i) + m->gappx;
|
||||
resize(c, m->wx + tx, m->wy + m->gappx, w - 2*(c->bw + m->gappx),
|
||||
m->wh - 2*(c->bw + m->gappx), 0);
|
||||
tx += WIDTH(c) + m->gappx;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user