Transparent xmobar
by Edward Z. Yang
Things I should be working on: graduate school personal statements.
What I actually spent the last five hours working on: transparent xmobar.

It uses the horrible “grab Pixmap from root X window” hack. You can grab the patch here but I haven’t put in enough effort to actually make this a configurable option; if you just compile that branch, you’ll get an xmobar that is at 100/255 transparency, tinted black. (The algorithm needs a bit of work to generalize over different tints properly; suggestions solicted!) Maybe someone else will cook up a more polished patch. (Someone should also drum up a more complete set of XRender bindings!)
This works rather nicely with trayer, which support near identical tint and transparency behavior. Trayer also is nice on Oneiric, because it sizes the new battery icon sensibly, whereas stalonetray doesn’t. If you’re wondering why the fonts look antialiased, that’s because I compiled with XFT support.
(And yes, apparently I have 101% battery capacity. Go me!)
Update. Feature has been prettified and made configurable. Adjust alpha in your config file: 0 is transparent, 255 is opaque. I’ve submitted a pull request.
Did you enjoy this post? Please subscribe to my feed!
Nice wallpaper!
What on earth is a “personal statement”? is “graduate school” something kind of dating site?
kfish: Nah, that’s what I hear undergrad is for.
This is a timely patch for me, as I just decided I wanted to try a transparent background today. Just a little bug report. When I set XMobar’s position to something aside from Top, the background that XMobar uses is still taken starting from the top left instead of from its actual position.
I tried looking at your patch to see if I could fix it myself, but X stuff is gibberish to me.
Oh, that’s a fascinating bug. I’ll see if I can fix that.