From df36a36fe10f22bc337784f8559e77401dd9a18e Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Wed, 3 Oct 2007 18:24:04 +0200 Subject: manageHook: use the curry style, better documentation darcs-hash:20071003162404-a5988-0e2b858c29ae9ba45ffa28137b61f5ac671bf005.gz --- Config.hs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Config.hs') diff --git a/Config.hs b/Config.hs index ba4b70c..238a51c 100644 --- a/Config.hs +++ b/Config.hs @@ -62,20 +62,25 @@ modMask = mod1Mask defaultGaps :: [(Int,Int,Int,Int)] defaultGaps = [(0,0,0,0)] -- 15 for default dzen --- | manageHook. Execute arbitrary actions and WindowSet manipulations when +-- | +-- Execute arbitrary actions and WindowSet manipulations when -- managing a new window. -manageHook :: Window -> (String, String, String) -> X (WindowSet -> WindowSet) +manageHook :: Window -- ^ the new window to manage + -> String -- ^ window title + -> String -- ^ window resource name + -> String -- ^ window resource class + -> X (WindowSet -> WindowSet) -- Float various windows: -manageHook w (_, _, c) | c `elem` floats = fmap (W.float w . snd) (floatLocation w) +manageHook w _ _ c | c `elem` floats = fmap (W.float w . snd) (floatLocation w) where floats = ["MPlayer", "Gimp"] -- Don't manage various panels and desktop windows: -manageHook w (_, c, _) | c `elem` ignore = reveal w >> return (W.delete w) +manageHook w _ n _ | n `elem` ignore = reveal w >> return (W.delete w) where ignore = ["gnome-panel", "desktop_window", "kicker", "kdesktop"] -- The default rule, do not edit this line. -manageHook _ _ = return id +manageHook _ _ _ _ = return id -- | -- numlock handling: -- cgit v1.2.3