This is my laptop configuration, the desktop one only differs in a few details (e.g. the total width of the bar due to a bigger screen resolution and no battery state etc.)
In terms of packages I think I installed xmonad, dmenu, dzen2 and conky. There is already a lot of material on how to setup Xmonad as a gnome-session, so I won't go into that. I'll only show the files here that I feel are most interesting - so without further ado:
Should be pretty self-explanatory with all the comments.
The most interesting part here is where I grab the ouput from amixer and format it to display the sound volume. Maybe I will replace this and the battery status with a nice icon later (then I have to switch over to "native" conky instead of just piping it into a dzen bar..
My startup script which aside from running some default programs at startup also starts the trayer, which I use to display all my tray icons (nm-applet, skype, pidgin etc.).
This generates output to show the battery state which I try and keep short, because my laptop screen is not that big.