[xmonad] xmobar
Brandon Allbery
allbery.b at gmail.com
Wed Nov 16 16:32:27 CET 2011
On Wed, Nov 16, 2011 at 10:12, Marco Guidetti <marco at marcoguidetti.org>wrote:
> > Why not just spawn all your xmobar instances whith spawnPipe, and then
> just
> > not using the pipe? This should properly restart all the instances when
> > restarting xmonad. Or would the pipe be garbage collected too early?
>
> I did try this way, but it doesn't work. I tried it again after
> receiving your mail, and... it still doesn't work :)
> Even if I use spawnPipe and I call it someway... something like
> myUncleJoe <- spawnPipe "xmobar ~/.xmobardownrc"
> it still doesn't work: once I hit mod+q the number of instances of
> running xmobar increases.
>
It's getting EOF from the closed pipe that triggers xmobar to exit. If
xmobar isn't reading from the pipe, it won't notice the EOF.
You could still do it, just use a dummy StdinReader and write a single
newline down the pipe after opening it.
bottomBar <- spawnPipe "xmobar ~/.xmobardownrc"
hPutStrLn bottomBar ""
(Since it's an empty line, the StdinReader won't take up any actual space.)
--
brandon s allbery allbery.b at gmail.com
wandering unix systems administrator (available) (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20111116/5d668cd6/attachment.htm>
More information about the xmonad
mailing list