I would like to be able to have xmonad write the output of its dynamicLogXinerama to a FIFO (that I can then read from a Unity app indicator and thus display the workspaces being currently used).

I modified my desktop config so that rather than executing xmonad directly it instead runs a simple wrapper script
#!/bin/sh

mkfifo
/tmp/xmonad-fifo
xmonad
> /tmp/xmonad-fifo
but to my surprise running 'tail -f /tmp/xmonad-fifo' shows no output, while if I simply start xmonad in a terminal I can see it printing information about the workspaces being used to the terminal:
[1] 
[1]
[2] 1
[2] 1
...
It would be awesome if anyone could tell me why xmonad's dynamicLog output is not showing up  in the FIFO. xmonad itself is clearly running (from the moment I start reading data from the FIFO.)

thanks!
~l