wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 87e8b017b52d733370b21bcd81ed83828cc512eb
parent 429de2d3761035d6b9303faa34c7d19b262c87d4
Author: Kris Maglione <kris@suckless.org>
Date:   Sun,  8 Nov 2009 04:45:21 -0500

Add a note about 'default' colmode to doc/wmii.tex. Some minor cleanup elsewhere.

Diffstat:
cmd/wmii/bar.c | 2++
cmd/wmii/client.c | 6+++---
cmd/wmii/column.c | 24++++++++++++------------
doc/wmii.tex | 2++
4 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/cmd/wmii/bar.c b/cmd/wmii/bar.c @@ -135,6 +135,8 @@ bar_draw(WMScreen *s) { uint width, tw; float shrink; + /* To do: Generalize this. */ + largest = nil; width = 0; foreach_bar(s, b) { diff --git a/cmd/wmii/client.c b/cmd/wmii/client.c @@ -178,9 +178,9 @@ client_create(XWindow w, XWindowAttributes *wa) { /* * It's actually possible for a window to be destroyed - * before we get a chance to reparant it. Check for that - * now, because otherwise we'll wind up mapping an empty - * frame. + * before we get a chance to reparent it. Check for that + * now, because otherwise we'll wind up mapping a + * perceptibly empty frame before it's destroyed. */ traperrors(true); reparentwindow(&c->w, c->framewin, p); diff --git a/cmd/wmii/column.c b/cmd/wmii/column.c @@ -17,7 +17,7 @@ char *modes[] = { bool column_setmode(Area *a, const char *mode) { - char *s, *t, *orig; + char *str, *tok, *orig; char add, old; /* @@ -28,15 +28,16 @@ column_setmode(Area *a, const char *mode) { */ orig = strdup(mode); - t = orig; + str = orig; old = '\0'; - for(s=t; *s; s=t) { + while(*(tok = str)) { add = old; - while((old=*s) && !strchr("+-^", old)) - s++; - *s = '\0'; - if(s > t) { - if(!strcmp(t, "max")) { + while((old=*str) && !strchr("+-^", old)) + str++; + *str = '\0'; + if(str > tok) { + print("'%s' %c\n", tok, add); + if(!strcmp(tok, "max")) { if(add == '\0' || add == '+') a->max = true; else if(add == '-') @@ -44,7 +45,7 @@ column_setmode(Area *a, const char *mode) { else a->max = !a->max; }else - if(!strcmp(t, "stack")) { + if(!strcmp(tok, "stack")) { if(add == '\0' || add == '+') a->mode = Colstack; else if(add == '-') @@ -52,7 +53,7 @@ column_setmode(Area *a, const char *mode) { else a->mode = a->mode == Colstack ? Coldefault : Colstack; }else - if(!strcmp(t, "default")) { + if(!strcmp(tok, "default")) { if(add == '\0' || add == '+') { a->mode = Coldefault; column_arrange(a, true); @@ -65,9 +66,8 @@ column_setmode(Area *a, const char *mode) { return false; } } - t = s; if(old) - t++; + str++; } free(orig); diff --git a/doc/wmii.tex b/doc/wmii.tex @@ -1015,6 +1015,8 @@ in these directories are: {\it‹n›/‹m›}, where ‹m› is the number of collapsed clients directly above and below the client, plus one, and ‹n› is the client's index in the stack. + \item[default] Like subtracting the stack mode, but all + clients in the column are given equal height. \end{description} For the floating area, the values are the same, except that