[xmonad] submapDefault patch - default action for submaps
ankaan at gmail.com
Sun Jan 18 10:50:25 EST 2009
Hi. I made some small changes to XMonad.Actions.Submap to add support
for a default action to take when the key doesn't match.
My reason for creating this patch is to be able to use sticky submaps
that only exit on a specific key, but I am sure it can be used for a
lot of other things, for example a multi-level on-screen-display menu.
entersub = submapDefault entersub sublist
sublist = M.fromList $
[ ((0, xK_Escape), return ())
, ((0, xK_u), spawn "mpc toggle" >> entersub)
And then bind a key to entersub.
Well, this is the first patch I am commiting, so I hope everything is
to your liking. Very good development tutorial for modules by the way.
Regards, Anders Engström.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 18343 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20090118/ea3e28d4/submapDefault.obj
More information about the xmonad