Python – Which window manager has Python bindings

desktop-environmentpythonwindow-manager

I've been coding bits here and there with Python and I'm most interested in Desktop Environments, for which I always have ideas I want to try out.

I have tried to play around with python-xlib but there is too little documentation on how to use this, and the ICCCM doc is very obscure. So I haven't been able to go very far.

More over I am not so much interested in making a window manager as I am interested in making applications for the desktop environment that interact with it. e.g. a task-bar. Talking to X directly then, means bypassing the WM.

So I'd like to know whether there is any of the major WM out there that have python bindings, so I could interact with them. I've found python-metacity and python-compizsettings but I've found zero documentation out there on how to use them.

The overall picture is a bit depressing from the Python viewpoint. If you have any suggestions, please let me know.

Best Answer

They are not "major" window managers, but there are three window managers that are python-based:

  • qtile, a hackable tiling window manager written in Python.
  • PyWM, a "pythonised" version of the fast light FLWM window manager.
  • whimsy, a small (~1000 SLOC), highly hackable window manager written in Python.

There is another one, samurai-x that is described as a "work in progress."

You could also take a look at stiler, a simple python script which does tiling on any window manager and PyWo which does the same thing on EWMH compliant window managers.