[xmonad] Escape key and multiple actions

Mattias Pettersson mattiaspgames at gmail.com
Wed Apr 7 19:18:46 EDT 2010


Hi there!

I would like to know(if possible) how to make the key escape do
whatever it does as default behaviour and also do something more at
the same time.
In my case I also want to: spawn "conkeror -f unfocus".

This is mycode which binds the escape key making it useless in all
other applications.

 xmonad $ defaultConfig
        { modMask = mod4Mask
        , keys = \c -> mykeys c `M.union` keys defaultConfig c
        , terminal = "xterm"
        , workspaces = workspaces'
        , manageHook = manageHook' <+> manageHook defaultConfig
       -- , layoutHook = layoutHook'
        , startupHook = startupHook'
        }
    where
        mykeys (XConfig {modMask = modm}) = M.fromList $
             [ ((0 , xK_Escape), spawn "conkeror -f unfocus") ]



Thanks in advance.


More information about the xmonad mailing list