mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-01 20:51:55 -07:00
Remove obsolete 'layout' function
This commit is contained in:
@@ -333,7 +333,12 @@ setFocusX w = withWindowSet $ \ws -> do
|
|||||||
-- uppermost.
|
-- uppermost.
|
||||||
--
|
--
|
||||||
switchLayout :: X ()
|
switchLayout :: X ()
|
||||||
switchLayout = layout (\(x, xs) -> let xs' = xs ++ [x] in (head xs', tail xs'))
|
switchLayout = do
|
||||||
|
sendMessage ModifyWindows
|
||||||
|
n <- gets (W.tag . W.workspace . W.current . windowset)
|
||||||
|
modify $ \s -> s { layouts = M.adjust switch n (layouts s) }
|
||||||
|
refresh
|
||||||
|
where switch (x, xs) = let xs' = xs ++ [x] in (head xs', tail xs')
|
||||||
|
|
||||||
-- | Throw a message to the current Layout possibly modifying how we
|
-- | Throw a message to the current Layout possibly modifying how we
|
||||||
-- layout the windows, then refresh.
|
-- layout the windows, then refresh.
|
||||||
@@ -434,19 +439,6 @@ splitHorizontallyBy f (Rectangle sx sy sw sh) =
|
|||||||
|
|
||||||
splitVerticallyBy f = (mirrorRect *** mirrorRect) . splitHorizontallyBy f . mirrorRect
|
splitVerticallyBy f = (mirrorRect *** mirrorRect) . splitHorizontallyBy f . mirrorRect
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
|
||||||
|
|
||||||
-- | layout. Modify the current workspace's layout with a pure
|
|
||||||
-- function and refresh.
|
|
||||||
layout :: ((Layout, [Layout]) -> (Layout, [Layout])) -> X ()
|
|
||||||
layout f = do
|
|
||||||
sendMessage ModifyWindows
|
|
||||||
modify $ \s ->
|
|
||||||
let n = W.tag . W.workspace . W.current . windowset $ s
|
|
||||||
(Just fl) = M.lookup n $ layouts s
|
|
||||||
in s { layouts = M.insert n (f fl) (layouts s) }
|
|
||||||
refresh
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Utilities
|
-- Utilities
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user