diff options
author | sean.escriva <sean.escriva@gmail.com> | 2009-07-01 23:56:40 +0200 |
---|---|---|
committer | sean.escriva <sean.escriva@gmail.com> | 2009-07-01 23:56:40 +0200 |
commit | 734348d4e011048c98975fbdedc810349b985871 (patch) | |
tree | 35ba5b09f23caa43bd0344ee06a3d3189c97f8cc /XMonad/Prompt | |
parent | 79fd177fd6c2433efaa10ac016b9641426b4507b (diff) | |
download | XMonadContrib-734348d4e011048c98975fbdedc810349b985871.tar.gz XMonadContrib-734348d4e011048c98975fbdedc810349b985871.tar.xz XMonadContrib-734348d4e011048c98975fbdedc810349b985871.zip |
Cleanup code duplication in X.P.Layout and X.P.Workspace
Ignore-this: 8675be8952f8d100c9042bdcdb962d3a
darcs-hash:20090701215640-29414-635465e7306088202cdbe0bc5251811c9c7b5d73.gz
Diffstat (limited to 'XMonad/Prompt')
-rw-r--r-- | XMonad/Prompt/Layout.hs | 5 | ||||
-rw-r--r-- | XMonad/Prompt/Workspace.hs | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/XMonad/Prompt/Layout.hs b/XMonad/Prompt/Layout.hs index 492cc07..706b382 100644 --- a/XMonad/Prompt/Layout.hs +++ b/XMonad/Prompt/Layout.hs @@ -50,7 +50,4 @@ instance XPrompt Wor where layoutPrompt :: XPConfig -> X () layoutPrompt c = do ls <- gets (map (description . layout) . workspaces . windowset) - mkXPrompt (Wor "") c (mkCompl $ sort $ nub ls) (sendMessage . JumpToLayout) - -mkCompl :: [String] -> String -> IO [String] -mkCompl l s = return $ filter (\x -> take (length s) x == s) l + mkXPrompt (Wor "") c (mkComplFunFromList' $ sort $ nub ls) (sendMessage . JumpToLayout) diff --git a/XMonad/Prompt/Workspace.hs b/XMonad/Prompt/Workspace.hs index 165eba9..c1820d4 100644 --- a/XMonad/Prompt/Workspace.hs +++ b/XMonad/Prompt/Workspace.hs @@ -43,7 +43,4 @@ workspacePrompt :: XPConfig -> (String -> X ()) -> X () workspacePrompt c job = do ws <- gets (workspaces . windowset) sort <- getSortByIndex let ts = map tag $ sort ws - mkXPrompt (Wor "") c (mkCompl ts) job - -mkCompl :: [String] -> String -> IO [String] -mkCompl l s = return $ filter (\x -> take (length s) x == s) l + mkXPrompt (Wor "") c (mkComplFunFromList' ts) job |