[xmonad] Compiling xmobar or taffybar into xmonad

Brandon Allbery allbery.b at gmail.com
Mon Jan 13 14:28:13 UTC 2014


On Mon, Jan 13, 2014 at 2:07 AM, Erik de Castro Lopo
<mle+hs at mega-nerd.com>wrote:

> > It's a very bad idea without rearchitecting xmonad's main loop to allow
> it
> > to support anything other than X11 events. In particular, you really want
> > timed events for a status bar, and at present the only way to get that
> > while maintaining access to xmonad's internal state is to have a separate
> > thread periodically sendMessage X11 events to the main thread.
>
> Taffybar already runs happily in its own process without access to xmonad's
> internal state, so all it would be doing is using the exising communication
> protocols and sharing the RTS.


As already noted, Xlib isn't reentrant so this would not work anyway, even
if you gave the taffybar thread its own server connection (which would be
necessary in any case).

There *is* a function that enables Xlib use in a threaded environment, but
it works by effectively wrapping all Xlib calls in a big mutex so
performance pretty well tanks.

In short, it's not worth it.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20140113/26444022/attachment.html>


More information about the xmonad mailing list