aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2010-04-16 23:29:39 +0200
committerAdam Vogt <vogt.adam@gmail.com>2010-04-16 23:29:39 +0200
commitc5b25d0fb00ff878886df89842c4a442819a0800 (patch)
tree983f531785953c66b51d71f0bbd132236961f257 /XMonad/Layout
parent879a7a8dd2e0c9360ed9a90f8bab1f945b265211 (diff)
downloadXMonadContrib-c5b25d0fb00ff878886df89842c4a442819a0800.tar.gz
XMonadContrib-c5b25d0fb00ff878886df89842c4a442819a0800.tar.xz
XMonadContrib-c5b25d0fb00ff878886df89842c4a442819a0800.zip
Use imported `fi' alias for fromIntegral more often.
Ignore-this: 51040e693066fd7803cc1b108c1a13d5 Also moves `fi' into U.Image to avoid cyclic imports, though XUtils sill exports that definition. darcs-hash:20100416212939-1499c-a12428074d873b1eaea197e1b79c0ca07a96b05f.gz
Diffstat (limited to '')
-rw-r--r--XMonad/Layout/Gaps.hs4
-rw-r--r--XMonad/Layout/Magnifier.hs4
-rw-r--r--XMonad/Layout/Reflect.hs3
3 files changed, 3 insertions, 8 deletions
diff --git a/XMonad/Layout/Gaps.hs b/XMonad/Layout/Gaps.hs
index 76dd57c..f672ea5 100644
--- a/XMonad/Layout/Gaps.hs
+++ b/XMonad/Layout/Gaps.hs
@@ -38,6 +38,7 @@ import Graphics.X11 (Rectangle(..))
import XMonad.Layout.LayoutModifier
import XMonad.Util.Types (Direction2D(..))
+import XMonad.Util.XUtils (fi)
import Data.List (delete)
@@ -133,9 +134,6 @@ toggleGap conf cur d | d `elem` cur = delete d cur
incGap :: GapSpec -> Direction2D -> Int -> GapSpec
incGap gs d i = map (\(dir,j) -> if dir == d then (dir,max (j+i) 0) else (dir,j)) gs
-fi :: (Num b, Integral a) => a -> b
-fi = fromIntegral
-
-- | Add togglable manual gaps to a layout.
gaps :: GapSpec -- ^ The gaps to allow, paired with their initial sizes.
-> l a -- ^ The layout to modify.
diff --git a/XMonad/Layout/Magnifier.hs b/XMonad/Layout/Magnifier.hs
index 7f812ce..6113412 100644
--- a/XMonad/Layout/Magnifier.hs
+++ b/XMonad/Layout/Magnifier.hs
@@ -32,6 +32,7 @@ module XMonad.Layout.Magnifier
import XMonad
import XMonad.StackSet
import XMonad.Layout.LayoutModifier
+import XMonad.Util.XUtils
-- $usage
-- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@:
@@ -159,6 +160,3 @@ fit (Rectangle sx sy sw sh) (Rectangle x y w h) = Rectangle x' y' w' h'
y' = max sy (y - (max 0 (y + fi h - sy - fi sh)))
w' = min sw w
h' = min sh h
-
-fi :: (Num b, Integral a) => a -> b
-fi = fromIntegral
diff --git a/XMonad/Layout/Reflect.hs b/XMonad/Layout/Reflect.hs
index bd127ea..19f6200 100644
--- a/XMonad/Layout/Reflect.hs
+++ b/XMonad/Layout/Reflect.hs
@@ -29,6 +29,7 @@ import Control.Arrow (second)
import XMonad.Layout.LayoutModifier
import XMonad.Layout.MultiToggle
+import XMonad.Util.XUtils (fi)
-- $usage
-- You can use this module by importing it into your @~\/.xmonad\/xmonad.hs@ file:
@@ -85,8 +86,6 @@ reflectRect Horiz (Rectangle sx _ sw _) (Rectangle rx ry rw rh) =
reflectRect Vert (Rectangle _ sy _ sh) (Rectangle rx ry rw rh) =
Rectangle rx (2*sy + fi sh - ry - fi rh) rw rh
-fi :: (Integral a, Num b) => a -> b
-fi = fromIntegral
data Reflect a = Reflect ReflectDir deriving (Show, Read)