[xmonad] Several new modules (patch flood)

Quentin Moser moserq at gmail.com
Sat Jan 16 21:10:11 EST 2010


Hello XMonad,


I apologize for the bulk delivery, these are all things I wrote over
the last week and I didn't really want
to stop coding to send updates (or eat, or sleep, for that matter --).

The basic idea was to implement the layout used in wmii. For those not
familiar with it:

    - Windows grouped in resizable columns
    - Each column has its own sub-layout, either full, vertical or
"stacked decoration"
    - You can of course move windows between columns, create new columns, etc.


This gave rise to a number of modules, which the rest of this mail describes.

To get a quick idea, you can also look at the few screenshots I put up:
http://ceii.posterous.com/new-xmonad-layout.


#1: XMonad.Layout.Groups

A generic version of the wmii thing: windows arranged into groups,
each with its own sub-layout. You
provide both the (starting) layout for new groups, and the layout that
arranges the groups themselves
on the screen.

Tis doesn't fit XMonad's layout interface that well, and indeed I
ended up having to completely
decouple the layout's idea of window ordering from XMonad's. For this
reason, the usual
swapUp/Down and focusUp/Down don't work here; the Groups module
provides messages
that can be used instead, and see #2 for a more flexible interface.


#2: XMonad.Layout.Groups.Examples

You can do a lot of fun things with the Groups combinator, so I put a
few examples in a dedicated
module. It also contains many useful X actions for Groups layouts,
including focusUp/Down,
swapUp/Down, etc. actions that work both for them and for standard
layouts (using X.A.MessageFeedback).

There are three example layouts:
  - The wmii layout, pretty faithfully cloned with the exception that
I was too lazy to write a stacked
     layout and used tabs instead. The columns are managed by a
ZoomRow (#3), so they can be
    individually resized and/or maximized.
  - A "row of columns" layout, with both rows and columns using ZoomRows.
  - A "tiled tabs" layout that arranges windows into tabbed groups,
and the groups themselves
    according to XMonad's default algorithm (Tall ||| Mirror Tall ||| Full)


#3: XMonad.Layout.ZoomRow

A layout that arranges its windows into a horizontal row, and allows
to freely resize each of them
using ZoomMessages.


#4: XMonad.Layout.Renamed

A LayoutModifier and DSL for modifying the description of a layout.
This is for when you want to
modify a layout with a dynamic description, and using Named would freeze it.


#5: XMonad.Util.Stack

I ended up doing quite a bit of non-trivial (Maybe Stack)
manipulation, so I wrote a separate module
for that. It provides maps, folds, filters and the like, as well as the whole
focusUp/Down-swapUp/Down-insertUp/Down suite with consistent types.



I've been using these for a few pretty active days now but they are by
no means fully tested, feedback
is welcome.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patches.dpatch
Type: application/octet-stream
Size: 98902 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20100116/68891384/patches-0001.obj


More information about the xmonad mailing list