Archive for October, 2007

Tony’s new ride

A picture says a thousand words:

Tony’s R8

I’m proud to have played a small part in this insanity. The R8 was featured on Top Gear a couple of weeks ago. The day after the episode aired, Philip and I told Tony, purely in jest, that he should buy one. I didn’t think he’d actually fricking do it.

Better aterm transparency

For the past several years, I’ve been using aterm as my terminal emulator. The main reason I keep coming back to it is the off-focus fading support (it dims all the terminal content anytime the main window frame loses focus). It’s possible to implement off-focus fading for any window or class of windows using a Compiz plugin, but it’s a much bigger PITA than just setting the aterm*fading resource in ~/.Xdefaults.

Unfortunately, aterm has a couple of limitations. One is that it doesn’t handle XK_ISO_Left_Tab, which is incredibly annoying since it means you can’t back up in e.g. a bash or VIM completion list. I think this has something to do with changes in when and how XK_ISO_Left_Tab gets sent versus a simple shifted-Tab, and I think the whole thing is as usual the fault of motherfucking i18n which I hate. I sent a patch to fix this problem to the aterm maintainer but I never got a response. Perhaps I should try pushing it through Ubuntu instead. Anyway, I digress.

Another limitation, which is the subject of this post, is that aterm’s transparency is of the cheap hack form where it just reads the window background and blits it to the terminal window. After giving up on gnome-terminal for like the twentieth time this morning, I went back and hacked in slightly better transparency support using the _NET_WM_WINDOW_OPACITY hint. Support for this hint in the EWMH spec was proposed like three years ago, and for some reason it’s still not there, but it works in the window managers I care about (compiz, xfwm4, and metacity w/ xcompmgr).

So, my new hacked aterm can read a new commandline argument of the form -tp %, where % is the transparency value (greater than 0 and less than 100). It can also read the same value from a new resource, aterm*transparency. It takes this value, converts it into a fractional multiple of the opaque value (0xffffffff), and then sets the _NET_WM_WINDOW_OPACITY property accordingly (I just copied the code from xcompmgr).

I’m uploading an AMD64 binary that runs on Ubuntu Gutsy. If you’re running 32-bit, go fuck yourself. No seriously, perhaps if I get more motivated I will build a 32-bit version, and upload packages as well. In the meantime, I’ll upload the patch too - it’s quite simple and it’s pretty easy to see how you could do this for any program. I’m also including a gratuitous screenshot that probably contains confidential information that I shouldn’t be posting on the intarweb.

The main remaining limitation is that this makes the entire aterm window, frame, text, and all, transparent according to the specified percentage. The right thing to do is to use an ARGB visual when creating the background window, so that the text and frame remain opaque. This is what Keith Packard’s hacked transparent xterm does. I may give that a shot if I get bored/annoyed by this in the future.

Cool idea in principle. Implementation seems a bit rough. I was trying to get directions for my cousin to get from Sun’s campus in Santa Clara to a field near Google in Mountain View (for a pickup cricket game). For Google to Sun, I got a three-bus route that takes an hour-and-a-half. Fair enough, I can believe that there’s nothing better.

The reverse route, however, was highly dubious.

AAA is Evil

I was unaware that the AAA spends a ton of money lobbying against public transportation and other environmentally friendly causes that might reduce the number of cars on the road. Read more about it here, or here.

I’m going to cancel my membership and join something else. Maybe this goofy Better World Club thing, though I’m afraid I won’t be able to wash out the hippie stink from my pants if I keep one of their membership cards in my wallet for too long.