Copyright | (c) Peter De Wachter and Andrea Rossato 2007 |
---|---|
License | BSD-style (see xmonad/LICENSE) |
Maintainer | andrea.rossato@unibz.it |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell2010 |
This is a layout modifier that will make a layout change the size of the window that has focus.
Example screenshot using magnifiercz' 1.3
with one of the two stack windows focused.
Synopsis
- magnify :: Rational -> MagnifyThis -> Bool -> l a -> ModifiedLayout Magnifier l a
- magnifier :: l a -> ModifiedLayout Magnifier l a
- magnifierOff :: l a -> ModifiedLayout Magnifier l a
- magnifiercz :: Rational -> l a -> ModifiedLayout Magnifier l a
- magnifierczOff :: Rational -> l a -> ModifiedLayout Magnifier l a
- maxMagnifierOff :: l a -> ModifiedLayout Magnifier l a
- maximizeVertical :: l a -> ModifiedLayout Magnifier l a
- magnifier' :: l a -> ModifiedLayout Magnifier l a
- magnifiercz' :: Rational -> l a -> ModifiedLayout Magnifier l a
- magnifierczOff' :: Rational -> l a -> ModifiedLayout Magnifier l a
- data MagnifyMsg
- data MagnifyThis
- data Magnifier a
Usage
You can use this module with the following in your ~/.xmonad/xmonad.hs
:
import XMonad.Layout.Magnifier
Then edit your layoutHook
by e.g. adding the magnifier
layout
modifier to some layout:
myLayout = magnifier (Tall 1 (3/100) (1/2)) ||| Full ||| etc.. main = xmonad def { layoutHook = myLayout }
By default magnifier
increases the focused window's size by 1.5
.
You can also use
to use a custom level of
magnification. You can even make the focused window smaller for a
pop in effect. There's also the possibility of starting out not
magnifying anything at all (magnifiercz
1.2magnifierOff
); see below for ways to
toggle this on while in use.
The most general combinator available is magnify
—all of the other
functions in this module are essentially just creative applications
of it.
For more detailed instructions on editing the layoutHook see:
Magnifier supports some commands, see MagnifyMsg
. To use them add
something like this to your key bindings:
, ((modm .|. controlMask , xK_plus ), sendMessage MagnifyMore) , ((modm .|. controlMask , xK_minus), sendMessage MagnifyLess) , ((modm .|. controlMask , xK_o ), sendMessage ToggleOff ) , ((modm .|. controlMask .|. shiftMask, xK_o ), sendMessage ToggleOn ) , ((modm .|. controlMask , xK_m ), sendMessage Toggle )
Note that a few other extension modules, such as
XMonad.Layout.MultiToggle and XMonad.Layout.ToggleLayouts, also
define a message named Toggle
. To avoid conflicts when using
these modules together, you can import Magnifier qualified, like
this:
import qualified XMonad.Layout.Magnifier as Mag
and then prefix Mag
to the front of everything from this module,
like Mag.Toggle
, Mag.magnifier
, and so on.
For detailed instruction on editing the key binding see XMonad.Doc.Extending.
General combinators
:: Rational | Amount to magnify both directions |
-> MagnifyThis | What to magnify |
-> Bool | Whether magnification should start out on
( |
-> l a | Input layout |
-> ModifiedLayout Magnifier l a |
Add magnification capabilities to a certain layout.
For example, to re-create magnifiercz
1.3', you would do
>>>
magnify 1.3 (NoMaster 1) True
Magnify Everything
magnifier :: l a -> ModifiedLayout Magnifier l a Source #
Increase the size of the window that has focus
magnifierOff :: l a -> ModifiedLayout Magnifier l a Source #
Magnifier that defaults to Off
magnifiercz :: Rational -> l a -> ModifiedLayout Magnifier l a Source #
Change the size of the window that has focus by a custom zoom
magnifierczOff :: Rational -> l a -> ModifiedLayout Magnifier l a Source #
Like magnifiercz
, but default to Off
.
maxMagnifierOff :: l a -> ModifiedLayout Magnifier l a Source #
A magnifier that greatly magnifies the focused window; defaults to
Off
.
maximizeVertical :: l a -> ModifiedLayout Magnifier l a Source #
A magnifier that greatly magnifies just the vertical direction
Don't Magnify the Master Window
magnifier' :: l a -> ModifiedLayout Magnifier l a Source #
Increase the size of the window that has focus, unless if it is one of the master windows.
magnifiercz' :: Rational -> l a -> ModifiedLayout Magnifier l a Source #
Increase the size of the window that has focus by a custom zoom, unless if it is one of the the master windows.
magnifierczOff' :: Rational -> l a -> ModifiedLayout Magnifier l a Source #
Like magnifiercz'
, but default to Off
.
Messages and Types
data MagnifyMsg Source #
Instances
Message MagnifyMsg Source # | |
Defined in XMonad.Layout.Magnifier |
data MagnifyThis Source #
Which windows to magnify and when to start doing so. Note that
magnifying will start at the cut-off, so AllWins 3
will start
magnifying when there are at least three windows present in the stack
set.
Instances
Read MagnifyThis Source # | |
Defined in XMonad.Layout.Magnifier readsPrec :: Int -> ReadS MagnifyThis # readList :: ReadS [MagnifyThis] # readPrec :: ReadPrec MagnifyThis # readListPrec :: ReadPrec [MagnifyThis] # | |
Show MagnifyThis Source # | |
Defined in XMonad.Layout.Magnifier showsPrec :: Int -> MagnifyThis -> ShowS # show :: MagnifyThis -> String # showList :: [MagnifyThis] -> ShowS # |
The type for magnifying a given type; do note that the given type
a
is a phantom type.