[xmonad] dzen example request

Toby Cubitt tsc25 at cantab.net
Wed Aug 11 15:27:41 EDT 2010

Hi Alex,

On Wed, Aug 11, 2010 at 09:17:45PM +0300, Alex Rozenshteyn wrote:
> I'm trying to figure out how to put a dzen bar at the bottom of my screen
> with a date and battery indicator.

In principle, you can do this entirely within your xmonad.hs. But for
mere mortals who don't find Haskell coding as easy as breathing, it's
probably easier to do this from a shell script or similar (which you can
either start from your xmonad.hs or from your .xsession or whatever).

You can find my own dzen scrpits at:


The first is a general status bar with wifi, ethernet, battery, CPU
frequency, temperature, email, weather, and date/time monitors (and
probably others I've forgotten I wrote). The second displays the
date/time with a drop-down calendar (this is just a modified version of a
script from the dzen web site). The third displays a weather forecast
from the BBC for your current location, with drop-down 5-day and 24-hour
forecasts (it requires the awk script to work).

They're not all that user-friendly. Configuration is done by editing
variables at the top of the scripts, or by hacking the scripts
themselves. YMMV.

> Other questions I have:
> Assuming I have a separate chat workspace, could I have dzen flash that
> workspace when one of the windows wants attention?  Or more generally, can
> have dzen or xmonad signal me when a window wants attention?

Check out urgency hooks (google Xmonad urgency hook). The documentation
from the xmonad site should get you started (and is better than anything
I could write).

> Any advice in general for pidgin?

You need to enable and configure the Message Notification plugin.

> Any advice in general for anything?

Just as with pidgin, for mutt, screen, urxvt and probably other apps, you
may have to do a little config tweaking to get urgency hooks working.

> I'm new to this, and it seems daunting, but I want to give it a chance.
> Thank you for any advice you have.

It's worth persevering. I've used many window managers over the years
(KDE, enlightenment, later with a tiling add-on, compiz-fusion with the
tiling module, ratpoison), but I'd never go back since discovering

It *is* daunting, since the more you configure Xmonad the more you end up
essentially implementing your own window manager in Haskell using Xmonad
as a set of libraries. That said, it's not too difficult to get up and
running quickly with a simple config, and slowly hone it to your needs
over time. Having that power and flexibility allows amazing
possibilities. I consider myself a novice Xmonad user, and an even worse
Haskell coder, but I've managed to configure Xmonad to do almost exactly
what I want.

Good luck!

Dr T. S. Cubitt
Quantum Information Theory group
Department of Mathematics
University of Bristol
United Kingdom

email: tsc25 at cantab.net
web: www.dr-qubit.org

More information about the xmonad mailing list