Adding handleEventHook to darcs man/xmonad.hs

Before sending a patch to the ./xmonad/man/xmonad.hs sample file, I wanted to get some feedback. My understanding of the event hook is not great. ;-) Please suggest improvements and correct innacuracies. I'll also update config archive on wiki. * Add handleEvenHook comment, myEventHook and use in defaultConfig: +------------------------------------------------------------------------ +-- Event handling: hunk ./man/xmonad.hs 226 +-- * EwmhDesktops users should change this to ewmhDesktopsEventHook +-- +-- Defines a custom handler function for X Events. The function should +-- return True if the default handler is to be run afterwards. To +-- combine Event Hooks use mappend or mconcat from Data.Monoid. +-- +myEventHook = handleEventHook hunk ./man/xmonad.hs 287 + handleEventHook = myEventHook, *---------------------- thanks, -- wmw

On Sun, Feb 08, 2009 at 07:18:15PM -0700, Wirt Wolff wrote:
Before sending a patch to the ./xmonad/man/xmonad.hs sample file, I wanted to get some feedback. My understanding of the event hook is not great. ;-) Please suggest improvements and correct innacuracies.
I'll also update config archive on wiki.
* Add handleEvenHook comment, myEventHook and use in defaultConfig:
+------------------------------------------------------------------------ +-- Event handling: hunk ./man/xmonad.hs 226 +-- * EwmhDesktops users should change this to ewmhDesktopsEventHook +-- +-- Defines a custom handler function for X Events. The function should +-- return True if the default handler is to be run afterwards. To +-- combine Event Hooks use mappend or mconcat from Data.Monoid. +-- +myEventHook = handleEventHook
hunk ./man/xmonad.hs 287 + handleEventHook = myEventHook, *----------------------
This seems to be cyclical. A better definition for myEventHook: myEventHook = mempty Otherwise the patch looks good. Cheers, Spencer Janssen

Excerpts from Spencer Janssen's message of Thu Mar 19 02:13:40 -0600 2009:
This seems to be cyclical. A better definition for myEventHook:
myEventHook = mempty
Ugh, indeed. Thanks for catching and fixing that. Apparently my mental state during patch creation was also 'mempty'! Wiki darcs template file updated with mempty. (Turns out mempty was not in scope, so patch sent to import Data.Monoid for man/xmonad.hs, too.) Added a few other updates to doc to make patch generation a little more worthwhile: * Updated ToggleStruts binding for mod-b, and left commented since xmonad-contrib may not be installed, * Used 'modm' instead of 'modMask' in bindings, since that shadowing can be confusing during irc troubleshooting. Apologies for not testing and resolving all this in original patch. -- wmw
participants (2)
-
Spencer Janssen
-
Wirt Wolff