[xmonad] X () with side effects

Brandon Allbery allbery.b at gmail.com
Sun Aug 14 19:07:20 CEST 2011

On Sun, Aug 14, 2011 at 06:05, Jochen Keil <jochen.keil at gmail.com> wrote:

> However, if I call foo from a keybinding
> ((modMask, xK_x), foo)
> the spawned program will run but not mapped. This means that I can see
> the console output in xmonad stdout/stderr but the window will not pop
> up. I think this is because of the internal handling of keyevents in

It's because your function is doing stuff instead of listening for X events.
 If you want to go off and do something else, forkIO a thread for the
something else.  If your something else requires communication with X11,
you'll need to think about rewriting around the event handler instead.

> code I have written. It's some kind of of vi-mode behaviour for xmonad.

XMonad.Actions.Submap would be a good starting point for this.  Not an ideal
one, as  it doesn't support timeouts or grabbing an entire submap.

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/20110814/862ab148/attachment.htm>

More information about the xmonad mailing list