diff options
author | Andrea Rossato <andrea.rossato@unibz.it> | 2008-02-23 09:15:53 +0100 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@unibz.it> | 2008-02-23 09:15:53 +0100 |
commit | 704ce0d5650dcf438772d62ae7eef846ae387f11 (patch) | |
tree | a750c91ff75983f268b3209cf4b45143832ee277 /XMonad | |
parent | c3a3497bbb10fc8f6da2bd9e1f5a6df4611e76fe (diff) | |
download | XMonadContrib-704ce0d5650dcf438772d62ae7eef846ae387f11.tar.gz XMonadContrib-704ce0d5650dcf438772d62ae7eef846ae387f11.tar.xz XMonadContrib-704ce0d5650dcf438772d62ae7eef846ae387f11.zip |
ToggleLayouts: reimplemented with runLayout
darcs-hash:20080223081553-32816-54b732073001f189d2bfbcb3a073263cfe948986.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Layout/ToggleLayouts.hs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/XMonad/Layout/ToggleLayouts.hs b/XMonad/Layout/ToggleLayouts.hs index 7fe68dc..846ca47 100644 --- a/XMonad/Layout/ToggleLayouts.hs +++ b/XMonad/Layout/ToggleLayouts.hs @@ -21,6 +21,7 @@ module XMonad.Layout.ToggleLayouts ( ) where import XMonad +import XMonad.StackSet (Workspace (..)) -- $usage -- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@: @@ -56,14 +57,11 @@ toggleLayouts :: (LayoutClass lt a, LayoutClass lf a) => lt a -> lf a -> ToggleL toggleLayouts = ToggleLayouts False instance (LayoutClass lt a, LayoutClass lf a) => LayoutClass (ToggleLayouts lt lf) a where - doLayout (ToggleLayouts True lt lf) r s = do (ws,mlt') <- doLayout lt r s - return (ws,fmap (\lt' -> ToggleLayouts True lt' lf) mlt') - doLayout (ToggleLayouts False lt lf) r s = do (ws,mlf') <- doLayout lf r s - return (ws,fmap (\lf' -> ToggleLayouts False lt lf') mlf') - emptyLayout (ToggleLayouts True lt lf) r = do (ws,mlt') <- emptyLayout lt r - return (ws,fmap (\lt' -> ToggleLayouts True lt' lf) mlt') - emptyLayout (ToggleLayouts False lt lf) r = do (ws,mlf') <- emptyLayout lf r - return (ws,fmap (\lf' -> ToggleLayouts False lt lf') mlf') + runLayout (Workspace i (ToggleLayouts True lt lf) ms) r = do (ws,mlt') <- runLayout (Workspace i lt ms) r + return (ws,fmap (\lt' -> ToggleLayouts True lt' lf) mlt') + + runLayout (Workspace i (ToggleLayouts False lt lf) ms) r = do (ws,mlf') <- runLayout (Workspace i lf ms) r + return (ws,fmap (\lf' -> ToggleLayouts False lt lf') mlf') description (ToggleLayouts True lt _) = description lt description (ToggleLayouts False _ lf) = description lf handleMessage (ToggleLayouts bool lt lf) m |