diff options
author | tim.thelion <tim.thelion@gmail.com> | 2007-12-09 00:08:44 +0100 |
---|---|---|
committer | tim.thelion <tim.thelion@gmail.com> | 2007-12-09 00:08:44 +0100 |
commit | 6679dff29b27e6b37f091fdbfffbdbaf92b3e3c1 (patch) | |
tree | 4f1f12d38d64d033d6d181e0cf077ee3cfba5746 /XMonad/Layout | |
parent | 5657169913de0d5a36fa8ec3472d691c52e6be2f (diff) | |
download | XMonadContrib-6679dff29b27e6b37f091fdbfffbdbaf92b3e3c1.tar.gz XMonadContrib-6679dff29b27e6b37f091fdbfffbdbaf92b3e3c1.tar.xz XMonadContrib-6679dff29b27e6b37f091fdbfffbdbaf92b3e3c1.zip |
Custom zoom levels for magnifier
darcs-hash:20071208230844-c18d4-d2b08a44f08e7cb909a0bb3c177fc098f0319f50.gz
Diffstat (limited to 'XMonad/Layout')
-rw-r--r-- | XMonad/Layout/Magnifier.hs | 13 |
1 files changed, 13 insertions, 0 deletions
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 |