[xmonad] xmobar

wagnerdm at seas.upenn.edu wagnerdm at seas.upenn.edu
Wed Nov 16 17:32:01 CET 2011

Quoting Marco Guidetti <marco at marcoguidetti.org>:

> I tried this,  but the biggest problem (for me) was to be able to
> distinguish between different instances of xmobar running.
> I solved it with (in the startup shell script):
> xmobardown=`ps ax |grep xmobar|grep -v up|awk '{print $1}'`
> for proc in ${xmobardown}
> do
>   kill -9 ${proc}
> done
> xmobar ~/.xmobardownrc &
> I am sure there is a more elegant way to do it, maybe using pidof (it
> didn't work for me tho) but this works, more or less.
> You say you use 4 instances of xmobar? Can I put xmobar also in
> "vertical"? That would be nice ;)

Seems pretty complicated. Why not kill all the xmobars? xmonad is  
about to restart them anyway. Stick something like this above your  
'spawn "xmobar -blahblah"' in xmonad.hs:

spawn "killall xmobar"


More information about the xmonad mailing list