Copyright | (c) 2013 Ilya Portnov |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | Ilya Portnov <portnov84@rambler.ru> |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell2010 |
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.
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 :: Type -> Type) (l2 :: Type -> Type) w Source #
Instances
(LayoutClass l1 Window, LayoutClass l2 Window) => LayoutClass (IfMax l1 l2) Window Source # | |
Defined in XMonad.Layout.IfMax 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) Source # | |
(Show (l1 w), Show (l2 w)) => Show (IfMax l1 l2 w) Source # | |
:: (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