I have written a new layout which i find very useful in two situations:

 - Vertical panoramic screens (9:16)
 - Working with terminals and dont want to loss the width.

The layout is quite simple and integrates very well with monocle. So it
can be used as a 'window selector' before switching to monocle layout.

Here's the layout code:

http://news.nopcode.org/hsplit-5.1.c

And my config:

http://news.nopcode.org/dwm-config.h

void
hsplit() {
        Client *c;
        unsigned int i, n; 

        for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next), n++);

        if (n)
        for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next),i++)
                resize(c, 0, (showbar?bh:0) + ((wh/n)*i), ww-(c->bw<<1), 
(wh/n)-(c->bw<<1),0);
}


My  configuration is:

static Layout layouts[] = {
        /* symbol     arrange function */
        { "[=]",      hsplit  },    /* first entry is default */
        { "[M]",      monocle }, /* first entry is default */
        { "[]=",      tile },    /* first entry is default */
        { "><>",      NULL },    /* no layout function means floating behavior 
*/
};
...
        { MODKEY,                       XK_t,  setlayout,          {.v = 
&layouts[2]} },
        { MODKEY,                       XK_m,  setlayout,          {.v = 
&layouts[1]} },
        { MODKEY,                       XK_e,  setlayout,          {.v = 
&layouts[0]} },
        { MODKEY,                       XK_space,  setlayout,
{0} },


You can use 'meta'+'space' to switch between monocle and hsplit

PD: I think that the patches available in the wiki are a bit outdated and needs 
to be
upgraded to the 5.x series. Well. some of them are outdated like my 
mouseontitle which
is not useful anymore with 5 because the feature is included in mainstream. Do 
you want
to maintain old patches keeping the support for old dwm versions?

Feedback is welcome :)

Enjoy!

Reply via email to