How about this? import Control.Monad import System.Exit import XMonad.Util.Run promptExit = do response <- runProcessWithInput "dmenu" ["-p", "Really quit?"] "yes\nno\n" when (response == "yes") (io (exitWith ExitSuccess)) Then you can add a keybinding like ((modMask, xK_q), promptExit). You might also look into XMonad.Prompt; somebody who's a bit more expert in that module can probably suggest how to do the analogous thing. ~d Quoting Ramon Diaz-Uriarte <rdiaz02@gmail.com>:
Dear All,
Occasionally, I do something silly and by mistake type
modMask + shift + q
and xmonad, as it should, immediately exits. When done accidentally, this is a pain. So:
a) is there a way to get xmonad to ask for confirmation to exit?
b) alternatively, can I define four (of five) key combinations, so I need to do something really contrived to exit?
I've searched both answers without success, and my attempts at four-key combinations have not worked (even if I get xmonad --recompile to run).
Thanks,
R. -- Ramon Diaz-Uriarte Department of Biochemistry, Lab B-25. Facultad de Medicina (UAM) Arzobispo Morcillo, 2 28029 Madrid Spain
Phone: +34-91-497-2412
Email: rdiaz02@gmail.com ramon.diaz@iib.uam.es
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad