xmonad-contrib-0.18.0: Community-maintained extensions for xmonad

Copyright | (c) Lukas Mai
License | BSD-style (see LICENSE)
Maintainer | <l.mai@web.de>
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Layout.Grid

Contents

- Usage

Description

A simple layout that attempts to put all windows in a square grid.

Synopsis

- data Grid a
  - = Grid
  - | GridRatio Double
- arrange :: Double -> Rectangle -> [a] -> [(a, Rectangle)]
- defaultRatio :: Double

# Usage

You can use this module with the following in your `xmonad.hs`:

    import XMonad.Layout.Grid

Then edit your `layoutHook` by adding the Grid layout:

    myLayout = Grid ||| Full ||| etc..
    main = xmonad def { layoutHook = myLayout }

You can also specify an aspect ratio for Grid to strive for with the GridRatio constructor. For example, if you want Grid to try to make a grid four windows wide and three windows tall, you could use

    myLayout = GridRatio (4/3) ||| etc.

For more detailed instructions on editing the layoutHook see the tutorial and XMonad.Doc.Extending.

data Grid a Source #

Constructors

Grid |
GridRatio Double |

#### Instances

Instances details

LayoutClass Grid a Source # |

Instance details

Defined in XMonad.Layout.Grid

Methods

runLayout :: Workspace WorkspaceId (Grid a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (Grid a)) Source #

doLayout :: Grid a -> Rectangle -> Stack a -> X ([(a, Rectangle)], Maybe (Grid a)) Source #

pureLayout :: Grid a -> Rectangle -> Stack a -> [(a, Rectangle)] Source #

emptyLayout :: Grid a -> Rectangle -> X ([(a, Rectangle)], Maybe (Grid a)) Source #

handleMessage :: Grid a -> SomeMessage -> X (Maybe (Grid a)) Source #

pureMessage :: Grid a -> SomeMessage -> Maybe (Grid a) Source #

description :: Grid a -> String Source #

Read (Grid a) Source # |
Instance details Defined in XMonad.Layout.Grid Methods readsPrec :: Int -> ReadS (Grid a) Source # readList :: ReadS [Grid a] Source # readPrec :: ReadPrec (Grid a) Source # readListPrec :: ReadPrec [Grid a] Source #
Show (Grid a) Source # |
Instance details Defined in XMonad.Layout.Grid Methods showsPrec :: Int -> Grid a -> ShowS Source # show :: Grid a -> String Source # showList :: [Grid a] -> ShowS Source #

arrange :: Double -> Rectangle -> [a] -> [(a, Rectangle)] Source #

defaultRatio :: Double Source #