On why I wrote pommed
Monday, March 5th, 2007Wouter asks why I wrote pommed instead of patching pbbuttonsd.
First things first, pommed was originally named mbpeventd and targeted only at the MacBook Pro and MacBook laptops. The port to the PowerBook and iBook (which is what Wouter uses, I think) wasn’t a goal at first.
pommed handles the hotkeys events and the ambient light sensors (if available) and that’s it. Nothing more. pbbuttonsd does a lot of other things that other pieces of software can handle far better than it does. I never ran it on my PowerBook and stuck to pmud; it did just what I needed it to do, and it did well. The kernel handled the LCD backlight all by itself, and I had no need for either the volume +/- keys or the eject key.
When I got my MacBook Pro, I took a look at the various ways to get the hotkeys to work. Well, nothing worked. I discovered that pbbuttonsd was also available on i386/amd64 and gave it a try. IIRC I had to build it on amd64, and the Makefile already raised a couple of mental flags. But oh well. Then I tried to configure it, and discovered a gazillion configuration options, half of them unneeded.
Anyway, I got to the point where it would run, and obviously there was some patching to be done to get it to play nice with the MacBook Pro. To put it simply: looking at the code made me cry. It’s horrible. Incredibly complicated and obfuscated for no good reason. At that point, patching was out of the question. Moreover, I never liked pbbuttonsd that much, for various reasons, ranging from its “let’s do everything!” policy to its SHM interface for the GUIs (come on, that’s the 21st century knocking at your door).
So, in a nutshell:
- it’s a nightmare to configure
- it does a lot of things that I do not want it to do
- I really can’t look at that code for more than 30 seconds without yelling at it
- it’s faster to just write something new from scratch than to clean up pbbuttonsd
- DBus looked like a nice thing to play with, and this was an opportunity to give it a shot
I really like the KISS approach and the traditional UNIX way of doing things, so I tend to dislike most one size fits all software.
It took me, what, 2 hours to build the first version of mbpeventd which handled the LCD and the keyboard backlight. That’s all the features I needed, past that point everything else was just pure bonus.
As for the name… mbpeventd really sucked as a name, and it wasn’t a good name anymore once the PowerBook support got added. I did not want to go with something like “appled” because I did not want to use the name “Apple”, but that was the closest match. Then I thought “hmm, why not … translate it … pommed? … sold!”. The name is funny for both Corsac and I because it’s a fortune cookie from one of the IRC channels we’re both hanging on; as it happens, the fortune is about Apple hardware and how users can get lost with a one button mouse.
So, why use pommed? Use it if you want something lightweight, fast and simple which won’t try to do everything for you. And you can even patch it and send me the patches!