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

This commit is contained in:
Kris Maglione 2009-11-08 04:45:21 -05:00
parent 429de2d376
commit 87e8b017b5
4 changed files with 19 additions and 15 deletions

View File

@ -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) {

View File

@ -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);

View File

@ -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);

View File

@ -1015,6 +1015,8 @@ in these directories are:
{\itn/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