, ,

This has nothing to do with the theme of the blog, but I just happened to find a wonderful window manager for my laptop. I’m generally using Gnome, since I like the looks, but I’ve never really liked Metacity, the default window manager in Gnome. On the other hand, I’ve lately been studying Haskell, a functional computing language. A wonderfully weird experience.

There just happens to be this new window manager written completely in Haskell, XMonad, which is a so-called tiling window manager — no empty spaces on your screen any more. I just had to try it, and believe me, it is very nice to use indeed. I wanted to integrate is with my Gnome system, and the panels especially, but that was not so easy. First I had to get very recent versions of XMonad — happily there are Debian packages, but not on the official repo — and then I had to figure out, how to configure XMonad so, that it

  1. ignores the gnome panels on my screen;
  2. Leaves empty space for the panels.

The instructions on the XMonad site were for the old versions and did not really completely work. The installation goes according to the instructions on that page, but what the page lacks is a complete, working example of the configuration. Here’s one:

You’ll have to create the file
where to put your configuration. A sample content for this file:

import XMonad

main = xmonad $ defaultConfig
       { defaultGaps = [(24,24,0,0)],
         manageHook = composeAll
                      [ className =? "MPlayer" --> doFloat
                      , className =? "Gimp" --> doFloat
                      , resource =? "gnome-panel" --> doIgnore ]

That gives you an empty space of 24 pixels at the top and bottom of the screen, and ignores gnome-panel. In addition, it lets Gimp and MPlayer float above other windows. Some fiddling with the session setup (see the link to the instructions) and this file in place, everything works fine, at least with XMonad 0.6. I haven’t tried the 0.5 series, so I cannot say, whether this works with them, and the versions before 0.5 use adifferent kind of a configuration scheme, so this does not work for those.

Update on 2008/05/01:

There is a page in the HaskellWiki on XMonad and Gnome, which contains all the information on this page plus much more. Go there!