[Haskell-cafe] Announce: xmobar-0.8 released!

Andrea Rossato mailing_list at istitutocolli.org
Sun Nov 11 05:44:42 EST 2007


Hello!

I'm very glad to announce the release of Xmobar-0.8.

You can grab the source code from Hackage:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xmobar-0.8

Xmobar is a minimalistic, text based, status bar. It was specifically
designed to work with the XMonad Window Manager.

Inspired by the Ion3 status bar, it supports similar features, like
dynamic color management, output templates, and extensibility through
plugins.

A precompiled binary is available here:
http://code.haskell.org/~arossato/xmobar/xmobar-0.8.bin

A recent screen shot can be found here:
http://code.haskell.org/~arossato/xmobar/xmobar-0.8.png

A screen shot of xmonad and xmobar (my desktop):
http://haskell.org/sitewiki/images/a/ae/Arossato-config.png

Xmobar depends on X11-1.3.0 and Cabal-1.2 but works both with
ghc-6.6.x and ghc-6.8.1.

Here you can find a version of the 0.8 source tree that works with
Cabal-1.1.x, but will *not* compile with ghc-6.8.1:
http://code.haskell.org/~arossato/xmobar/xmobar-0.8-Cabal-1.1-ghc-6.6.tar.gz

Some basic documentation is available at the following address:
http://code.haskell.org/~arossato/xmobar/

I would like to thank Robert Manea and Spencer Janssen for their help
in understanding X and Xlibs. Thanks to Claus Reinke for making me
understand existential types (or at least for letting me think I grasp
them ;).

Xmobar incorporates patches from: Krzysztof Kosciuszkiewicz, Spencer
Janssen, Jens Petersen, Dmitry Kurochkin, and Lennart Kolmodin.

Hope you will enjoy!

Andrea Rossato

What's new
==========

There are a lot of changes since the last release:

a. Configuration:
   - removed xPos, yPos, width, height, align, and refresh
     configuration options;
   - added position and alignSep configuration options: the first is
     used to set the position (Top, Bottom or Static; the second to
     set the characters to be used to separate, in the output
     template, text that must be aligned to the left, centered, or
     aligned to the right;

   (please have look at xmobar.config-sample and the README for more
   details)

b. Plugins:
   - added a plugin to read Unix named pipe (useful to display XMonad
     logs);
   - added a plugin to read from standard input;
   - a new plugin API makes it possible to write plugins that perform
     asynchronous actions. The new API is totally backward compatible;

c. Output template:
   - it is now possible to align text in the output template. By
     default text before a '}' will be align to left, the text in
     between '}' and '{' will be centered, and the text after a '{'
     will be align to the right, like:
     "left } centered { right"
   - strings can have also a background color set:
     "<fc=red,white>%date%<fc>"
     will display the output of the "date" command in red with a white
     background.

d. Concurrency: now Xmobar uses Software Transactional Memory and the
main window is updated only when needed

e. Documentation: I now use Pandoc for the README, this way I have
also created an HTML version of. I hope that makes the documentation a
bit more accessible:
http://code.haskell.org/~arossato/xmobar/

f. The darcs repository has been moved to:
http://code.haskell.org/xmobar

g. XRandR: since positioning is now done automatically, XRandR should
be supported too, even thought support could be buggy due to the fact
that I cannot actually test it, since I don't have capable hardware.

h. Cabal-1.2 and ghc-6.8.1 support.

i. Many other small changes and code cleanup: darcs changes will tell
you everything.

Configuration Example
=====================

This is my ~/.xmobarrc:

Config { font = "-bitstream-charter-*-r-normal-*-10-*-*-*-*-56-*-*"
       , bgColor = "black"
       , fgColor = "grey"
       , position = Top
       , commands = [ Run Weather "LIPB" ["-L","18","-H","27","--normal","green","--high","red","--low","lightblue"] 36000
                    , Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10
                    , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
                    , Run Memory ["-t","Mem: <usedratio>%"] 10
                    , Run Battery ["-L","50","-H","75","--high","green","--normal","yellow", "--low", "red"] 10
                    , Run Swap [] 10
                    , Run Com "uname" ["-s","-r"] "" 36000
		    , Run Date "%a %b %_d %Y * %H:%M:%S" "mydate" 10
		    , Run PipeReader "/home/andrea/.xmonad-status" "xlog"
                    ]
       , sepChar = "%"
       , alignSep = "}{"
       , template = "%xlog% }{ %cpu% | %memory% * %swap% | %eth1% | %LIPB% | <fc=orange>%mydate%</fc> | %battery%"
       }



More information about the Haskell-Cafe mailing list