-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A library for specifying xmonad key bindings with functionality. -- -- A library for specifying xmonad key bindings with search and help -- functions. @package DescriptiveKeys @version 0.0.4 -- | Specify your key-bindings with a description and zero or more tags, -- then add a key-binding to search through them. module XMonad.Config.DescriptiveKeys -- | Wraps an optional string to denote a description for a key-binding. newtype Description Description :: (Maybe String) -> Description -- | The data structure that denotes an annotated key-binding. data DescriptiveKey DescriptiveKey :: ButtonMask -> KeySym -> X () -> Description -> Tags -> DescriptiveKey mask :: DescriptiveKey -> ButtonMask sym :: DescriptiveKey -> KeySym action :: DescriptiveKey -> X () description :: DescriptiveKey -> Description tags :: DescriptiveKey -> Tags -- | A default key-binding that has no description or tags. defaultDescriptiveKey :: ButtonMask -> KeySym -> X () -> DescriptiveKey -- | A list of descriptive key-bindings that have access to the -- XConfig. data DescriptiveKeys -- | Construct a list of descriptive key-bindings. descriptiveKeys :: (XConfig Layout -> [DescriptiveKey]) -> DescriptiveKeys -- | Construct a list of descriptive key-bindings by specifying the -- description as a string and the tags as a list of strings. wKeys :: (XConfig Layout -> [(KeyMask, KeySym, X (), String, [String])]) -> DescriptiveKeys -- | Sets the keys property of the given XConfig with the -- given descriptive key-bindings. setDescriptiveKeys :: DescriptiveKeys -> XConfig l -> XConfig l -- | Wraps a string to create a tag. newtype Tag Tag :: String -> Tag -- | A set of tags. type Tags = Set Tag -- | Returns all the tags for a given list of key-bindings. allTags :: XConfig Layout -> DescriptiveKeys -> Tags -- | How to produce a set of tags from a string, which will likely come -- from user-input. newtype SearchTags SearchTags :: (String -> Tags) -> SearchTags searchTags :: SearchTags -> String -> Tags -- | Splits a string by spaces to produce a set of tags. defaultSearchTags :: SearchTags -- | Removes all descriptive key-bindings that are not in the given set of -- tags. filterTags :: Tags -> DescriptiveKeys -> DescriptiveKeys -- | A pretty-printer for descriptive key-bindings. data DescriptiveKeysPP DescriptiveKeysPP :: ([DescriptiveKey] -> String) -> DescriptiveKeysPP -- | A plain-text pretty-printer that takes particular care of mod/mask -- keys and spacing. defaultDescriptiveKeysPP :: DescriptiveKeysPP -- | The prompt text when searching newtype SearchTextPrompt SearchTextPrompt :: String -> SearchTextPrompt -- | The default search prompt, Search key-bindings defaultSearchTextPrompt :: SearchTextPrompt -- | The action to take to describe key-bindings from a string user-input. newtype DescribeKeys DescribeKeys :: (String -> X ()) -> DescribeKeys describeKeys :: DescribeKeys -> String -> X () -- | A default that opens xmessage and uses the default -- pretty-printer. defaultDescribeKeys :: DescriptiveKeys -> XConfig Layout -> DescribeKeys -- | The attributes required to do the final configuration of the -- descriptive key-bindings. data HelpPromptConfig HelpPromptConfig :: DescriptiveKeys -> XPConfig -> (ButtonMask, KeySym) -> SearchTextPrompt -> DescribeKeys -> HelpPromptConfig -- | The descriptive key-bindings. descriptiveHelp :: HelpPromptConfig -> DescriptiveKeys -- | The XPConfig that is used. xpConfigHelp :: HelpPromptConfig -> XPConfig -- | The key-binding to prompt the user to search. keyHelp :: HelpPromptConfig -> (ButtonMask, KeySym) -- | The search text prompt. searchTextHelp :: HelpPromptConfig -> SearchTextPrompt -- | The action to take after string user-input. describeHelp :: HelpPromptConfig -> DescribeKeys -- | Sets the help prompt on the given XPConfig. helpPrompt :: (XConfig Layout -> HelpPromptConfig) -> XConfig l -> XConfig l -- | Sets the help prompt on the given XPConfig and sets the -- keys attribute. helpPromptAndSet :: DescriptiveKeys -> XPConfig -> (ButtonMask, KeySym) -> SearchTextPrompt -> (XConfig Layout -> DescribeKeys) -> XConfig l -> XConfig l -- | Sets the help prompt on the given XPConfig and sets the -- keys attribute with a default key-binding of mod-F1, default -- search text prompt and using xmessage to provide the -- descriptive response. defaultHelpPromptAndSet :: DescriptiveKeys -> XPConfig -> XConfig l -> XConfig l instance Eq Tag instance Ord Tag instance Show Tag instance Eq Description instance Ord Description instance Show Description instance Eq SearchTextPrompt instance Ord SearchTextPrompt instance Show SearchTextPrompt