Archive for October, 2007
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.
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.
Search
Latest
Archives
- March 2010
- February 2010
- January 2010
- December 2009
- October 2009
- September 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- September 2008
- August 2008
- July 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- May 2007
- April 2007
- March 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- March 2006
- February 2006
- January 2006
- December 2005
- October 2005
- August 2005
- July 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
