From a2c68eb4d0616e856ecc3fb775ff5d6517becbda Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Fri, 8 Feb 2008 00:21:55 +0100 Subject: Prompt.Theme: comments and some point-free darcs-hash:20080207232155-32816-b33ac4902f1f2c2cfef11570edea06fab9ad5cf4.gz --- XMonad/Prompt/Theme.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'XMonad/Prompt/Theme.hs') diff --git a/XMonad/Prompt/Theme.hs b/XMonad/Prompt/Theme.hs index 6392f41..a1f25be 100644 --- a/XMonad/Prompt/Theme.hs +++ b/XMonad/Prompt/Theme.hs @@ -8,8 +8,7 @@ -- Stability : unstable -- Portability : unportable -- --- A prompt for chnaging the theme of the current workspace --- +-- A prompt for changing the theme of the current workspace ----------------------------------------------------------------------------- module XMonad.Prompt.Theme @@ -27,7 +26,8 @@ import XMonad.Layout.Decoration import XMonad.Util.Themes -- $usage --- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@: +-- You can use this module with the following in your +-- @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad.Prompt -- > import XMonad.Prompt.Theme @@ -45,8 +45,8 @@ instance XPrompt ThemePrompt where showXPrompt ThemePrompt = "Select a theme: " themePrompt :: XPConfig -> X () -themePrompt c = mkXPrompt ThemePrompt c (const $ return (map fst $ M.toList mapOfThemes)) changeTheme - where changeTheme t = sendMessage . SetTheme $ fromMaybe defaultTheme (M.lookup t mapOfThemes) +themePrompt c = mkXPrompt ThemePrompt c (const . return . map themeName $ listOfThemes) changeTheme + where changeTheme t = sendMessage . SetTheme . fromMaybe defaultTheme $ M.lookup t mapOfThemes mapOfThemes :: M.Map String Theme -mapOfThemes = M.fromList . uncurry zip . (map themeName &&& map theme) $ listOfThemes \ No newline at end of file +mapOfThemes = M.fromList . uncurry zip . (map themeName &&& map theme) $ listOfThemes -- cgit v1.2.3