aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Layout')
-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)