From 6679dff29b27e6b37f091fdbfffbdbaf92b3e3c1 Mon Sep 17 00:00:00 2001 From: "tim.thelion" Date: Sun, 9 Dec 2007 00:08:44 +0100 Subject: Custom zoom levels for magnifier darcs-hash:20071208230844-c18d4-d2b08a44f08e7cb909a0bb3c177fc098f0319f50.gz --- XMonad/Layout/Magnifier.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'XMonad/Layout') diff --git a/XMonad/Layout/Magnifier.hs b/XMonad/Layout/Magnifier.hs index ebe74de..af45b03 100644 --- a/XMonad/Layout/Magnifier.hs +++ b/XMonad/Layout/Magnifier.hs @@ -22,6 +22,7 @@ module XMonad.Layout.Magnifier -- $usage magnifier, magnifier', + magnifiercz, MagnifyMsg (..) ) where @@ -39,6 +40,14 @@ import XMonad.Layout.LayoutModifier -- -- > myLayouts = magnifier (Tall 1 (3/100) (1/2)) ||| Full ||| etc.. -- > main = xmonad defaultConfig { layoutHook = myLayouts } +-- +-- By default magnifier increases the focused windows size by 1.5 +-- you can do: +-- > magnifiercz (12%10) +-- to use a custom level of magification. You can even make the focused +-- window smaller for a pop in effect. Keep in mind, you must +-- >import Data.Ratio +-- For to use rationals in your config. -- -- For more detailed instructions on editing the layoutHook see: -- @@ -59,6 +68,10 @@ import XMonad.Layout.LayoutModifier magnifier :: l a -> ModifiedLayout Magnifier l a magnifier = ModifiedLayout (Mag 1.5 On All) +-- | Change the size of the window that has focus by a custom zoom +magnifiercz :: Rational -> l a -> ModifiedLayout Magnifier l a +magnifiercz cz = ModifiedLayout (Mag ((fromRational cz)*1.0::Double) On All) + -- | Increase the size of the window that has focus, unless if it is the -- master window. magnifier' :: l a -> ModifiedLayout Magnifier l a -- cgit v1.2.3