[incise.org] whimsy

Whimsy is a highly hackable window manager written in Python. It is currently pre-alpha or maybe alpha quality and is somewhat suitable for use, depending on your expectations. The main mechanism of event handling is the listener pattern, also known as the observer pattern. Here is main.py, which still contains my own personal key/mouse bindings, since I've pretty much been developing whimsy hermit-style so far. It should give you a decent idea of what Whimsy is like to play with, code-wise. Here is the rest of the code for browsing at github. Here is ewmh.py which will show you which EWMH hints have been implemented thus far.

code/usage

CODE MAY BE UNSTABLE AND LOCK YOUR X SERVER. In theory, it should kill and rerun itself after hanging for 20 seconds via alarm().

You should either install python-xlib via whatever means you are comfortable with, or you can run fetch-python-xlib.sh to fetch it from svn and then add the appropriate directory to your PYTHONPATH manually. Whimsy is developed against svn trunk so you could possibly have problems with older versions of python-xlib.

To run whimsy:

$ git clone git://github.com/mackstann/whimsy.git
$ export PYTHONPATH=$PWD/whimsy:$PYTHONPATH
$ python whimsy/whimsy/main.py

I generally run it in a loop in case it dies (which is very rare for me at this point) and I also launch it inside of screen:

export PYTHONPATH=$HOME/dev/whimsy
screen -S whimsy -d -m -- sh -c 'while true; do python dev/whimsy/whimsy/main.py; done'

There are no window borders/decorations. There is support for viewports/large desktops (which are basically like virtual desktops, but are "physically" linked in that a window hanging off of one will show up partially in the next, instead of being completely isolated little worlds). There aren't many window management operations implemented other than the basics: moving, resizing, closing, raising, lowering, and executing commands. You can also execute arbitrary Python, of course.

status

Whimsy has been an on again, off again toy project of mine since sometime in 2005. I've been using it as my normal window manager since around March 2007.


Nick Welch <nick@incise.org>