minor tweaks, ideas from joachim.fasting@

This commit is contained in:
Don Stewart
2007-06-21 03:36:13 +00:00
parent c6da7fc14a
commit 776886660b
2 changed files with 2 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ view = windows . W.view
modifyGap :: (Int -> (Int,Int,Int,Int) -> (Int,Int,Int,Int)) -> X () modifyGap :: (Int -> (Int,Int,Int,Int) -> (Int,Int,Int,Int)) -> X ()
modifyGap f = do modifyGap f = do
XState { windowset = ws, statusGaps = gaps } <- get XState { windowset = ws, statusGaps = gaps } <- get
let n = fromIntegral $ W.screen (W.current ws) let n = fromIntegral . W.screen $ W.current ws
(a,i:b) = splitAt n gaps (a,i:b) = splitAt n gaps
modify $ \s -> s { statusGaps = a ++ f n i : b } modify $ \s -> s { statusGaps = a ++ f n i : b }
refresh refresh

View File

@@ -182,7 +182,7 @@ spawn x = io $ do
-- current window state. -- current window state.
restart :: Maybe String -> Bool -> X () restart :: Maybe String -> Bool -> X ()
restart mprog resume = do restart mprog resume = do
prog <- maybe (io $ getProgName) return mprog prog <- maybe (io getProgName) return mprog
args <- if resume then gets (("--resume":) . return . show . windowset) else return [] args <- if resume then gets (("--resume":) . return . show . windowset) else return []
catchIO (executeFile prog True args Nothing) catchIO (executeFile prog True args Nothing)