aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Hooks
diff options
context:
space:
mode:
authorSpencer Janssen <spencerjanssen@gmail.com>2008-09-18 03:38:58 +0200
committerSpencer Janssen <spencerjanssen@gmail.com>2008-09-18 03:38:58 +0200
commit0c7aa0bb5b46b95bbf89e8db52b7cee12c884907 (patch)
treeeb4fdc6fce51046a4e35c5961136b7718cbbcafe /XMonad/Hooks
parent508debd233d9bddf5f5f8c8ad071fcbe52da4f0e (diff)
downloadXMonadContrib-0c7aa0bb5b46b95bbf89e8db52b7cee12c884907.tar.gz
XMonadContrib-0c7aa0bb5b46b95bbf89e8db52b7cee12c884907.tar.xz
XMonadContrib-0c7aa0bb5b46b95bbf89e8db52b7cee12c884907.zip
statusBar now supplies the action to toggle struts
darcs-hash:20080918013858-25a6b-eae69817cc9f3ba2835bbe62f458959244921e5c.gz
Diffstat (limited to 'XMonad/Hooks')
-rw-r--r--XMonad/Hooks/DynamicLog.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/XMonad/Hooks/DynamicLog.hs b/XMonad/Hooks/DynamicLog.hs
index db16042..8e99302 100644
--- a/XMonad/Hooks/DynamicLog.hs
+++ b/XMonad/Hooks/DynamicLog.hs
@@ -179,7 +179,7 @@ xmobar conf = statusBar "xmobar" xmobarPP toggleStrutsKey conf
statusBar :: LayoutClass l Window
=> String -- ^ the command line to launch the status bar
-> PP -- ^ the pretty printing options
- -> (XConfig Layout -> ((KeyMask, KeySym), X ()))
+ -> (XConfig Layout -> (KeyMask, KeySym))
-- ^ the desired key binding to toggle bar visibility
-> XConfig l -- ^ the base config
-> IO (XConfig (ModifiedLayout AvoidStruts l))
@@ -191,14 +191,16 @@ statusBar cmd pp k conf = do
logHook conf
dynamicLogWithPP pp { ppOutput = hPutStrLn h }
, manageHook = manageHook conf <+> manageDocks
- , keys = liftM2 M.union (uncurry M.singleton . k) (keys conf)
+ , keys = liftM2 M.union keys' (keys conf)
}
+ where
+ keys' = (`M.singleton` sendMessage ToggleStruts) . k
-- |
-- Helper function which provides ToggleStruts keybinding
--
-toggleStrutsKey :: XConfig t -> ((KeyMask, KeySym), X ())
-toggleStrutsKey XConfig{modMask = modm} = ((modm, xK_b ), sendMessage ToggleStruts)
+toggleStrutsKey :: XConfig t -> (KeyMask, KeySym)
+toggleStrutsKey XConfig{modMask = modm} = (modm, xK_b )
------------------------------------------------------------------------