
Hello, I am trying to write a function which has side-effects, e.g. call spawn. foo :: X () foo = do io $ spawn "myprogram" doSomethingElseOrReturn foo -- recursion 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 xmonads main. Is there a way I could bypass this and have my windows mapped as soon as I call the program with spawn? I hope this is clear enough.. if not, I'll come back with the actual code I have written. It's some kind of of vi-mode behaviour for xmonad. Pure X actions (like focusing up/down) work without problems but spawning doesn't. Many thanks and best regards, Jochen