xmonad-contrib-0.17.1: Community-maintained 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 | Safe-Inferred
Language | Haskell2010

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 #

Constructors

IfMax Int (l1 w) (l2 w) |

#### Instances

Instances details

(LayoutClass l1 Window, LayoutClass l2 Window) => LayoutClass (IfMax l1 l2) Window # |
Instance details Defined in XMonad.Layout.IfMax Methods runLayout :: Workspace WorkspaceId (IfMax l1 l2 Window) Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (IfMax l1 l2 Window)) # doLayout :: IfMax l1 l2 Window -> Rectangle -> Stack Window -> X ([(Window, Rectangle)], Maybe (IfMax l1 l2 Window)) # pureLayout :: IfMax l1 l2 Window -> Rectangle -> Stack Window -> [(Window, Rectangle)] # emptyLayout :: IfMax l1 l2 Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (IfMax l1 l2 Window)) # handleMessage :: IfMax l1 l2 Window -> SomeMessage -> X (Maybe (IfMax l1 l2 Window)) # pureMessage :: IfMax l1 l2 Window -> SomeMessage -> Maybe (IfMax l1 l2 Window) # description :: IfMax l1 l2 Window -> String #
(Read (l1 w), Read (l2 w)) => Read (IfMax l1 l2 w) # |
Instance details Defined in XMonad.Layout.IfMax Methods readsPrec :: Int -> ReadS (IfMax l1 l2 w) # readList :: ReadS [IfMax l1 l2 w] # readPrec :: ReadPrec (IfMax l1 l2 w) readListPrec :: ReadPrec [IfMax l1 l2 w]
(Show (l1 w), Show (l2 w)) => Show (IfMax l1 l2 w) # |
Instance details Defined in XMonad.Layout.IfMax Methods showsPrec :: Int -> IfMax l1 l2 w -> ShowS # show :: IfMax l1 l2 w -> String # showList :: [IfMax l1 l2 w] -> ShowS #

ifMax #

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