diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-01 21:10:59 +0100 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-01 21:10:59 +0100 |
commit | 4866f2e367dfcf22a9591231ba40948826a1b438 (patch) | |
tree | 7a245caee3f146826b267d773b7eaa80386a818e /WorkspacePrompt.hs | |
parent | 47589e1913fb9530481caedb543978a30d4323ea (diff) | |
download | XMonadContrib-4866f2e367dfcf22a9591231ba40948826a1b438.tar.gz XMonadContrib-4866f2e367dfcf22a9591231ba40948826a1b438.tar.xz XMonadContrib-4866f2e367dfcf22a9591231ba40948826a1b438.zip |
Hierarchify
darcs-hash:20071101201059-a5988-fc1f1262bec1b69e13ba18ae7cefeafc8c4471d4.gz
Diffstat (limited to 'WorkspacePrompt.hs')
-rw-r--r-- | WorkspacePrompt.hs | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/WorkspacePrompt.hs b/WorkspacePrompt.hs deleted file mode 100644 index 1087cf0..0000000 --- a/WorkspacePrompt.hs +++ /dev/null @@ -1,45 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : XMonadContrib.WorkspacePrompt --- Copyright : (C) 2007 Andrea Rossato, David Roundy --- License : BSD3 --- --- Maintainer : droundy@darcs.net --- Stability : unstable --- Portability : unportable --- --- A directory prompt for XMonad --- ------------------------------------------------------------------------------ - -module XMonadContrib.WorkspacePrompt ( - -- * Usage - -- $usage - workspacePrompt - ) where - -import Control.Monad.State ( gets ) -import Data.List ( sort ) -import XMonad hiding ( workspaces ) -import XMonadContrib.XPrompt -import XMonad.StackSet ( workspaces, tag ) - --- $usage --- You can use this module with the following in your Config.hs file: --- --- > import XMonadContrib.WorkspacePrompt --- --- > , ((modMask .|. shiftMask, xK_m ), workspacePrompt myXPConfig (windows . W.shift)) - -data Wor = Wor String - -instance XPrompt Wor where - showXPrompt (Wor x) = x - -workspacePrompt :: XPConfig -> (String -> X ()) -> X () -workspacePrompt c job = do ws <- gets (workspaces . windowset) - let ts = sort $ map tag ws - mkXPrompt (Wor "") c (mkCompl ts) job - -mkCompl :: [String] -> String -> IO [String] -mkCompl l s = return $ filter (\x -> take (length s) x == s) l |