xmonad-contrib-0.18.1: Community-maintained extensions for xmonad
Copyright(c) Peter De Wachter and Andrea Rossato 2007
LicenseBSD-style (see xmonad/LICENSE)
Maintainerandrea.rossato@unibz.it
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

XMonad.Layout.Magnifier

Description

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

Usage

You can use this module with the following in your 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 magnifiercz 1.2 or magnifierxy 1 1000 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 (magnifierOff); 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 the tutorial and XMonad.Doc.Extending.

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 the tutorial.

General combinators

magnify Source #

Arguments

:: Rational

Amount to magnify both directions

-> MagnifyThis

What to magnify

-> Bool

Whether magnification should start out on (True) or off (False)

-> 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

magnifyxy Source #

Arguments

:: Rational

Amount to magnify horizontally

-> Rational

Amount to magnify vertically

-> MagnifyThis

What to magnify

-> Bool

Whether magnification should start out on (True) or off (False)

-> l a

Input layout

-> ModifiedLayout Magnifier l a 

Like magnify, but with the ability to specify different amounts of horizontal and vertical magnification.

>>> magnifyxy 1.3 1.6 (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.

magnifierxy :: Rational -> Rational -> l a -> ModifiedLayout Magnifier l a Source #

Increase the size of the window that has focus by a custom zoom in both directions.

magnifierxyOff :: Rational -> Rational -> l a -> ModifiedLayout Magnifier l a Source #

Like magnifierxy, 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; defaults to Off.

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.

magnifierxy' :: Rational -> Rational -> l a -> ModifiedLayout Magnifier l a Source #

Increase the size of the window that has focus by a custom zoom in both directions, unless it is one of the master windows.

magnifierxyOff' :: Rational -> Rational -> l a -> ModifiedLayout Magnifier l a Source #

Like magnifierxy', but defaults to Off.

Messages and Types

data MagnifyMsg Source #

Instances

Instances details
Message MagnifyMsg Source # 
Instance details

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.

Constructors

AllWins !Natural

Every window

NoMaster !Natural

Only stack windows

data Magnifier a Source #

The type for magnifying a given type; do note that the given type a is a phantom type.

Instances

Instances details
LayoutModifier Magnifier Window Source # 
Instance details

Defined in XMonad.Layout.Magnifier

Read (Magnifier a) Source # 
Instance details

Defined in XMonad.Layout.Magnifier

Show (Magnifier a) Source # 
Instance details

Defined in XMonad.Layout.Magnifier