diff options
author | David Roundy <droundy@darcs.net> | 2007-06-19 17:08:16 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-06-19 17:08:16 +0200 |
commit | 44004c24d5b4274e9b666497934f2a6a1fc34f59 (patch) | |
tree | 902858067505fd119d9b67d32d61f3db93656334 /Operations.hs | |
parent | a1131013b194ed268594c06ce29784166471c64c (diff) | |
download | xmonad-44004c24d5b4274e9b666497934f2a6a1fc34f59.tar.gz xmonad-44004c24d5b4274e9b666497934f2a6a1fc34f59.tar.xz xmonad-44004c24d5b4274e9b666497934f2a6a1fc34f59.zip |
make Layouts able to layout whatever they like.
darcs-hash:20070619150816-72aca-a651e758e93e300c3e526985b328f0b1d7def60c.gz
Diffstat (limited to 'Operations.hs')
-rw-r--r-- | Operations.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Operations.hs b/Operations.hs index 6d54c7c..4eaf3e2 100644 --- a/Operations.hs +++ b/Operations.hs @@ -368,14 +368,14 @@ instance Message IncMasterN -- simple fullscreen mode, just render all windows fullscreen. -- a plea for tuple sections: map . (,sc) -full :: Layout +full :: Layout a full = Layout { doLayout = \sc (W.Stack f _ _) -> return [(f, sc)] , modifyLayout = const (return Nothing) } -- no changes -- -- The tiling mode of xmonad, and its operations. -- -tall :: Int -> Rational -> Rational -> Layout +tall :: Int -> Rational -> Rational -> Layout a tall nmaster delta frac = Layout { doLayout = \r -> return . ap zip (tile frac r nmaster . length) . W.integrate , modifyLayout = \m -> return $ msum [fmap resize (fromMessage m) @@ -390,7 +390,7 @@ mirrorRect :: Rectangle -> Rectangle mirrorRect (Rectangle rx ry rw rh) = (Rectangle ry rx rh rw) -- | Mirror a layout, compute its 90 degree rotated form. -mirror :: Layout -> Layout +mirror :: Layout a -> Layout a mirror (Layout { doLayout = dl, modifyLayout = ml }) = Layout { doLayout = \sc w -> map (second mirrorRect) `fmap` dl (mirrorRect sc) w , modifyLayout = fmap (fmap mirror) . ml } |