diff options
author | Andrea Rossato <andrea.rossato@unibz.it> | 2008-02-16 14:37:38 +0100 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@unibz.it> | 2008-02-16 14:37:38 +0100 |
commit | 79d598db5c32f84a0d12131d0f24f99edcb0f5ce (patch) | |
tree | 8ebd13e65d4dec73fc1763301fdca8e2c9dd05d2 /XMonad | |
parent | eda5f05d0180d2a8e7a903b4ecebc0023bc3d0ac (diff) | |
download | XMonadContrib-79d598db5c32f84a0d12131d0f24f99edcb0f5ce.tar.gz XMonadContrib-79d598db5c32f84a0d12131d0f24f99edcb0f5ce.tar.xz XMonadContrib-79d598db5c32f84a0d12131d0f24f99edcb0f5ce.zip |
Theme: move theme's nextCompletion implementation to Prompt.getNextCompletion
darcs-hash:20080216133738-32816-bcecfaa205c235b6e480a25bdc03d222aa205d51.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Prompt/Theme.hs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/XMonad/Prompt/Theme.hs b/XMonad/Prompt/Theme.hs index cf67a36..89063a5 100644 --- a/XMonad/Prompt/Theme.hs +++ b/XMonad/Prompt/Theme.hs @@ -45,10 +45,7 @@ data ThemePrompt = ThemePrompt instance XPrompt ThemePrompt where showXPrompt ThemePrompt = "Select a theme: " commandToComplete _ c = c - nextCompletion _ c l = l !! idx - where idx = case c `elemIndex` l of - Just i -> if i >= length l - 1 then 0 else i + 1 - Nothing -> 0 + nextCompletion _ = getNextCompletion themePrompt :: XPConfig -> X () themePrompt c = mkXPrompt ThemePrompt c (const . return . map ppThemeInfo $ listOfThemes) changeTheme |