mirror of
https://github.com/xmonad/xmonad.git
synced 2025-07-31 04:01:52 -07:00
simplify StackSet api even further (-15 loc)
This commit is contained in:
10
Main.hs
10
Main.hs
@@ -210,11 +210,9 @@ view :: Int -> W ()
|
||||
view o = do
|
||||
ws <- gets workspace
|
||||
let m = W.current ws
|
||||
when (n /= m) $
|
||||
whenJust (W.index n ws) $ \new ->
|
||||
whenJust (W.index m ws) $ \old -> do
|
||||
mapM_ hide old
|
||||
mapM_ reveal new
|
||||
windows $ W.view n
|
||||
when (n /= m) $ do
|
||||
mapM_ hide (W.index m ws)
|
||||
mapM_ reveal (W.index n ws)
|
||||
windows $ W.view n
|
||||
where n = o-1
|
||||
|
||||
|
Reference in New Issue
Block a user