xmonad-contrib-0.18.1.9: Community-maintained extensions for xmonad
Copyright(c) 2013 Ilya Portnov
LicenseBSD3-style (see LICENSE)
MaintainerIlya Portnov <portnov84@rambler.ru>
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Layout.IfMax

Contents

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

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

Instances details
(LayoutClass l1 Window, LayoutClass l2 Window) => LayoutClass (IfMax l1 l2) Window Source # 
Instance details

Defined in XMonad.Layout.IfMax

(Read (l1 w), Read (l2 w)) => Read (IfMax l1 l2 w) Source # 
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) Source # 
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 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