I have not looked at the code in a good while but wanted to suggest
the following code concept.  My thought sprang from Anselm writing

> I propose using setlayout("[M]") and setlayout("[]=")

and then later

> I plan to introduce 3 additional key bindings:
>
> Mod1-f (Apply floating layout)
> Mod1-m (Apply monocle layout)
> Mod1-t (Apply tiled layout)

There already is a notion of the current layout.  Imagine that
there is also a saved layout and the following function:

char *resolvelayout(char *proposed)
{
    if (proposed == current)
        proposed = saved;
    else
        saved = current;
    current = proposed;
    return proposed;
}

With this function I can have every target layout toggle:

    setlayout( resolvelayout("[M]") );
    setlayout( resolvelayout("[]=") );
    setlayout( resolvelayout("<><") );

Just a thought,

/john

Reply via email to