mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-31 22:25:29 -04:00
opt:sprial layout gaps
This commit is contained in:
parent
4be4c211df
commit
6581a23735
1 changed files with 15 additions and 10 deletions
25
maomao.c
25
maomao.c
|
|
@ -4840,18 +4840,22 @@ void fibonacci(Monitor *mon, int s) {
|
||||||
Client *c;
|
Client *c;
|
||||||
|
|
||||||
wl_list_for_each(c, &clients, link)
|
wl_list_for_each(c, &clients, link)
|
||||||
if (VISIBLEON(c, mon) && !c->isfloating)
|
if (VISIBLEON(c, mon) && !c->isfloating && !c->iskilling
|
||||||
|
&& !c->isfullscreen && !c->ismaxmizescreen
|
||||||
|
&& !c->animation.tagouting)
|
||||||
n++;
|
n++;
|
||||||
if(n == 0)
|
if(n == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nx = mon->w.x;
|
nx = mon->w.x + gappoh;
|
||||||
ny = 0;
|
ny = mon->w.y + gappov;
|
||||||
nw = mon->w.width;
|
nw = mon->w.width - gappoh;
|
||||||
nh = mon->w.height;
|
nh = mon->w.height - gappov;
|
||||||
|
|
||||||
wl_list_for_each(c, &clients, link)
|
wl_list_for_each(c, &clients, link)
|
||||||
if (VISIBLEON(c, mon) && !c->isfloating){
|
if (VISIBLEON(c, mon) && !c->isfloating && !c->iskilling
|
||||||
|
&& !c->isfullscreen && !c->ismaxmizescreen
|
||||||
|
&& !c->animation.tagouting) {
|
||||||
if((i % 2 && nh / 2 > 2 * c->bw)
|
if((i % 2 && nh / 2 > 2 * c->bw)
|
||||||
|| (!(i % 2) && nw / 2 > 2 * c->bw)) {
|
|| (!(i % 2) && nw / 2 > 2 * c->bw)) {
|
||||||
if(i < n - 1) {
|
if(i < n - 1) {
|
||||||
|
|
@ -4883,15 +4887,16 @@ void fibonacci(Monitor *mon, int s) {
|
||||||
if(i == 0)
|
if(i == 0)
|
||||||
{
|
{
|
||||||
if(n != 1)
|
if(n != 1)
|
||||||
nw = mon->w.width * mon->mfact;
|
nw = (mon->w.width - gappoh) * mon->pertag->mfacts[mon->pertag->curtag];
|
||||||
ny = mon->w.y;
|
ny = mon->w.y + gappov;
|
||||||
}
|
}
|
||||||
else if(i == 1)
|
else if(i == 1)
|
||||||
nw = mon->w.width - nw;
|
nw = mon->w.width - gappoh - nw;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
resize(c, (struct wlr_box){.x = nx, .y = ny,
|
resize(c, (struct wlr_box){.x = nx, .y = ny,
|
||||||
.width = nw - 2 * c->bw, .height = nh - 2 * c->bw}, 0);
|
.width = nw - gappih, .height = nh - gappiv}, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue