Commits

Tony Morris  committed 3028167

help combinators for default config

  • Participants
  • Parent commits 2dbb397

Comments (0)

Files changed (2)

File DescriptiveKeys.cabal

 Name:               DescriptiveKeys
-Version:            0.0.1
+Version:            0.0.2
 License:            BSD3
 License-File:       LICENSE
 Author:             Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>

File src/XMonad/Config/DescriptiveKeys.hs

 , defaultDescribeKeys
 , HelpPromptConfig(..)
 , helpPrompt
+, helpPromptAndSet
+, defaultHelpPromptAndSet
 ) where
 
 import qualified Data.Set as S
                  in M.insert ms (inputPromptWithCompl xpc stp compl ?+ describek) (keys c d)
    }
 
+helpPromptAndSet ::
+  DescriptiveKeys
+  -> XPConfig
+  -> (ButtonMask, KeySym)
+  -> SearchTextPrompt
+  -> (XConfig Layout -> DescribeKeys)
+  -> XConfig l
+  -> XConfig l
+helpPromptAndSet k c m s d =
+  helpPrompt (\l -> HelpPromptConfig {
+    descriptiveHelp = k
+  , xpConfigHelp    = c
+  , keyHelp         = m
+  , searchTextHelp  = s
+  , describeHelp    = d l
+  }) .
+  setDescriptiveKeys k
+
+defaultHelpPromptAndSet ::
+  DescriptiveKeys
+  -> XPConfig
+  -> XConfig l
+  -> XConfig l
+defaultHelpPromptAndSet k c =
+  helpPromptAndSet k c (mod4Mask, xK_F1) defaultSearchTextPrompt (defaultDescribeKeys k)