xmonad-contrib-0.12: Third party extensions for xmonad

Copyright | (c) 2013 Ilya Portnov
License | BSD3-style (see LICENSE)
Maintainer | Ilya Portnov <portnov84@rambler.ru>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell98

XMonad.Layout.IfMax

Contents

- Usage

Description

Provides IfMax layout, which will run one layout if there are maximum N windows on workspace, and another layout, when number of windows is greater than N.

Synopsis

- data IfMax l1 l2 w = IfMax Int (l1 w) (l2 w)
- ifMax :: (LayoutClass l1 w, LayoutClass l2 w) => Int -> l1 w -> l2 w -> IfMax l1 l2 w

# Usage

IfMax layout will run one layout if number of windows on workspace is as maximum N, and else will run another layout.

You can use this module by adding folowing in your `xmonad.hs`:

    import XMonad.Layout.IfMax

Then add layouts to your layoutHook:

    myLayoutHook = IfMax 2 Full (Tall ...) ||| ...

In this example, if there are 1 or 2 windows, Full layout will be used; otherwise, Tall layout will be used.

data IfMax l1 l2 w Source

Constructors

IfMax Int (l1 w) (l2 w) |

Instances

(LayoutClass l1 a, LayoutClass l2 a) => LayoutClass (IfMax l1 l2) a Source |
(Read (l1 w), Read (l2 w)) => Read (IfMax l1 l2 w) Source |
(Show (l1 w), Show (l2 w)) => Show (IfMax l1 l2 w) Source |

ifMax Source

Arguments

:: (LayoutClass l1 w, LayoutClass l2 w) |
=> Int | Maximum number of windows for the first layout
-> l1 w | First layout
-> l2 w | Second layout
-> IfMax l1 l2 w |

Layout itself