Archive for the ‘Compiz’ Category

pyCompiz: An easy way to control Compiz Fusion from Python

I have been coding a new multi-touch mouse driver for GNU/Linux, in Python of course. I got the basic tapping down, but I wanted to go further. I though it would be cool to be able to put all five fingers down and have it trigger the Compiz scale plugin, or similar. I looked around for a non hackish way of doing it, and was appalled by the [lack] of documentation, and even support, for interfacing Python to Compiz Fusion.

So, what would any DIY Python/GNU/Linux freak do? Write his own binding of course! I wrote pyCompiz just for this purpose.  Its really simple, you can call any compiz plugin in one line or less:D To trigger the scale plugin: compiz.call(‘scale’, ‘initiate_key’).  I have it hosted on a Google Code page, for anyone interested.  I don’t plan on updating it very often, only for bug fixes. There really aren’t any features that could be added, its such a simple thing. Anyway, here is the link. Its under the GPLv2 License, so anyone can use it. Happy Hacking!

Advertisements