[xmonad] DynamicLog improvements and new contrib module, XMonad.Util.Loggers

Andrea Rossato andrea.rossato at unibz.it
Wed Feb 20 02:24:57 EST 2008

On Tue, Feb 19, 2008 at 04:50:15PM -0500, Brent Yorgey wrote:
> Just a quick description of a patch I just pushed to the xmonad-contrib
> darcs repo. First, I cleaned up DynamicLog and added a bunch of
> documentation and examples -- getting a working status bar seems like one of
> the more difficult aspects of a typical xmonad setup, so hopefully this will
> go some ways towards fixing that.
> In another step to make setting up a useful status bar easier, I also added
> a new field to the PP record, ppExtras.  This is a list of 'loggers', i.e.
> (X (Maybe String)) actions, which will be run each time the status is
> generated, and their output added to the normal window title + layout +
> workspace information.  As an example of the sorts of things you can put
> there, and as a repository for useful loggers that people might create, I
> also added a new module, XMonad.Util.Loggers.  The upshot of all this is
> that I used to have a separate script to get the time and date, battery
> information, and load averages, into which I would pipe the output of
> xmonad, and then pipe the output of that script into dzen.  Now, I no longer
> have a separate script, I can just throw a few loggers in the ppExtras field
> of my PP format, and hey presto!  Simpler, easier to maintain, and easier
> for newcomers to figure out.
> If you find the new ppExtras feature useful, I hope you'll create some new
> Loggers and put them in the Loggers module.  And feel free to improve
> upon/generalize the ones that are already there.  Ideally there should be a
> wide array of useful, configurable loggers that new users can choose from
> when constructing their preferred status bar.
> happy xmonading,

And so your plan of world domination has been eventually revealed! You
want to get rid of the very reasons why xmobar had to be written! I'll
fight it to death!!

I'm just kidding... very nice idea, indeed.

Just one question: why Maybe String? I had a very quick read at your
code, but as far as I understand using 'catMaybes' means that 'Just
[]' and 'Nothing' have the very same meaning. Am I wrong?


More information about the xmonad mailing list