updated Dmenu.hs to work with zipper StackSet

This commit is contained in:
Jason Creighton 2007-05-21 23:39:47 +00:00
parent 1b80f26dfe
commit 32bb8aa154

View File

@ -5,8 +5,6 @@ import qualified StackSet as W
import System.Process
import System.IO
import Control.Monad.State
import Data.Maybe
import qualified Data.Map as M
runProcessWithInput :: FilePath -> [String] -> String -> IO String
runProcessWithInput cmd args input = do
@ -24,8 +22,7 @@ runProcessWithInput cmd args input = do
-- http://www.jcreigh.com/dmenu/dmenu-2.8-xinerama.patch
dmenuXinerama :: [String] -> X String
dmenuXinerama opts = do
ws <- gets windowset
let curscreen = fromIntegral $ fromMaybe 0 (M.lookup (W.current ws) (W.ws2screen ws)) :: Int
curscreen <- (fromIntegral . W.screen . W.current) `liftM` gets windowset :: X Int
io $ runProcessWithInput "dmenu" ["-xs", show (curscreen+1)] (unlines opts)
dmenu :: [String] -> X String