diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2009-10-02 02:15:52 +0200 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2009-10-02 02:15:52 +0200 |
commit | 8fc37974a17279512fa75c64961040f1d7a82041 (patch) | |
tree | 6ba24d49df81c62d006c23b9137c981bbbbfd637 | |
parent | f3606efc44b3b039f4c5d4773e81298408942def (diff) | |
download | XMonadContrib-8fc37974a17279512fa75c64961040f1d7a82041.tar.gz XMonadContrib-8fc37974a17279512fa75c64961040f1d7a82041.tar.xz XMonadContrib-8fc37974a17279512fa75c64961040f1d7a82041.zip |
Small style change in L.SimplestFloat
Ignore-this: d8be5d01d47833c70d220e0f1555c42f
darcs-hash:20091002001552-1499c-7420fa180b5944e43bd8d277e2445a542d645226.gz
-rw-r--r-- | XMonad/Layout/SimplestFloat.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/XMonad/Layout/SimplestFloat.hs b/XMonad/Layout/SimplestFloat.hs index 61a3c0d..699fafa 100644 --- a/XMonad/Layout/SimplestFloat.hs +++ b/XMonad/Layout/SimplestFloat.hs @@ -23,6 +23,7 @@ import XMonad import qualified XMonad.StackSet as S import XMonad.Layout.WindowArranger import XMonad.Layout.LayoutModifier +import XMonad.Util.XUtils (fi) -- $usage -- You can use this module with the following in your @@ -42,12 +43,12 @@ import XMonad.Layout.LayoutModifier -- | A simple floating layout where every window is placed according -- to the window's initial attributes. simplestFloat :: Eq a => (ModifiedLayout WindowArranger SimplestFloat) a -simplestFloat = (windowArrangeAll $ SF) +simplestFloat = windowArrangeAll SF data SimplestFloat a = SF deriving (Show, Read) instance LayoutClass SimplestFloat Window where - doLayout SF sc (S.Stack w l r) = do wrs <- mapM (getSize sc) (w : reverse l ++ r) - return (wrs, Nothing) + doLayout SF sc (S.Stack w l r) = fmap (flip (,) Nothing) + $ mapM (getSize sc) (w : reverse l ++ r) description _ = "SimplestFloat" getSize :: Rectangle -> Window -> X (Window,Rectangle) @@ -60,5 +61,3 @@ getSize (Rectangle rx ry _ _) w = do wh = (fi $ wa_width wa) + (bw * 2) ht = (fi $ wa_height wa) + (bw * 2) return (w, Rectangle x y wh ht) - where - fi x = fromIntegral x
\ No newline at end of file |