Re: [dwm] found a nice way to do the setgeom stuff

From: Szabolcs Nagy <nszabolcs_AT_gmail.com>
Date: Wed, 19 Mar 2008 14:28:11 +0100

On 3/19/08, Anselm R. Garbe <arg_AT_suckless.org> wrote:
> I care only about what should be mainstream and what not. And I
> think you understand my reasons why I won't like those oneliners
> being mainstream, if we already have DEFGEOM.

now that

int bx, by, bw, bh, blw, bgw, mx, my, mw, mh, mox, moy, mow, moh, tx,
ty, tw, th, wx, wy, ww, wh;

is available in config.h, i think geometry tweaks can be handcrafted
(and thus not mainstream)

eg togglebar can be

void
togglebar(const char *arg) {
    by = -bh;
    XMoveWindow(dpy, barwin, bx, by);
    my = 0;
    mh += bh;
    lt->arrange();
}

but it won't work if the bar was on the bottom or on a different
monitor from master etc

grow/shrink can be solved eg with a mfact const

float mfact = 0.6;
DEFGEOM(right, 0, 0, sw, 0, bh, sw, sh-bh, wx, wy, mfact*sw, wh,
mx+mw, wy, ww-mw, wh, wx, wy, ww, wh)
DEFGEOM(bottom, 0, 0, sw, 0, bh, sw, sh-bh, wx, wy, sw, mfact*wh,
mx, wy+mh, ww, wh-mh, wx, wy, ww, wh)

void growm() {
    mfact += 0.01;
    lt->arrange();
}

imho there is no possible generic solution for these if we allow
generic defgeom setting.

so i vote for either no mainstream solution or restrict possible geoms
in some way.
Received on Wed Mar 19 2008 - 14:28:43 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:27:31 UTC