[xmonad] Issue 143 in xmonad: XEvent hook or similar needed

codesite-noreply at google.com codesite-noreply at google.com
Sat Feb 23 12:31:35 EST 2008

Issue 143: XEvent hook or similar needed

Comment #1 by andrea.rossato:
After our conversation on IRC, I thought a bit more about this
issue and this is the idea I'd like to play a bit with.

If runLayout is going to be accepted (and I'm quite confident Spencer
may not dislike the idea) - and if we solve issue #111 (and I did some
steps in that direction) -, it would be possible to set up a
layout modifier in a given workspace that would just intercept X
events and handle them accordingly.

This is the idea: we have a layout modifier like this

data HandleEvent a = HandleEvent ToogleReceiver ...

type ToogleReceiver = Bool

this layout modifier would be using the modifyLayout method and, when
called the first time, it would activate itself (or/and it could
broadcast a message to deactivate the receivers on the other
workspaces), and would start handling Events - Main.handle is going to
broadcast them to all layouts, current, visible and hidden.

This may sound ugly at the first sight. But if you think a bit, that
could be a flexible solution: we could have an event handler attached
to each workspace, and it could handle events globally, or on a
workspace basis manner.

Moreover, unlike an EventHook, which would be quite inflexible (the
configuration is in a ReaderT monad), you could send messages to the
HandleEvent modifier itself, to turn it on/off, or just change its

Maybe I'm just wrong, but I think that before pushing for an event hook we
should give this path a try. I would be really glad to give you all the
help I can give to write such a layout modifier.

Let me know.

You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:

More information about the xmonad mailing list