EvilWM for Python
py-EvilWM is the smallest and simplest, yet a very usable, X window
Some window managers are mouse heaven and keyboard hell. Other window
managers are the other way around.
But py-EvilWM aims to be very comfortable to use from either.
py-EvilWM is a "pythonised" version of EvilWM, and
aims to give you easy-to-use tools to create your own personal dream
Package includes manpage for EvilWM, which lists the default key
Written in C, py-EvilWM was fairly easy to encapsulate EvilWM within
Python classes via Pyrex
What's the Python Scenario?
I've hacked EvilWM to expose it to Python as a module, defining a
window manager class called 'WM', plus a class 'window' for each window
that gets created.
The basic trip is that you subclass this WM class, and add your own
Look at the doco, and the test.py example in the tarball - it's very
Within your handlers, you can:
Your handlers can receive events, such as:
- Move/resize windows
- Hide/Show/Close windows
- Launch other apps (see the evilmenu.py example)
- Switch between desktops
- Dynamically bind, rebind and unbind keystrokes
- Window manager startup
- Window gets created
- Window gets destroyed
- Mouse enters a window
- Window gets moved or resized
- Custom key sequence is received
- Mouse click is received
In contrast to other Python-driven window managers, this one is so easy
and intuitive that you'll be hacking your own window manager script in a
couple of minutes.
Add your own handlers, take your own actions, get your desktop exactly
want it, without the horriffic bloat of certain other window managers.
But above all, have fun!
Caveat - due to some quirks in Pyrex, some exceptions may not appear on
stdout - if things ever look weird, just sprinkle in a few print
statements while debugging, until you figure out what's happening.
I'm Curious - Gimme a Copy!
Download py-EvilWM here
- Pyrex (see above)
- python 2.2
- Optionally - Tkinter, PMW (only needed for the add-on 'menu'
- The Leo
metastructural code editor - makes the source much more understandable