xmonad-contrib-0.15: Third party extensions for xmonad

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

XMonad.Layout.HintedGrid

Contents

- Usage

Description

A not so simple layout that attempts to put all windows in a square grid while obeying their size hints.

Synopsis

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

# Usage

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

    import XMonad.Layout.HintedGrid

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

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

You can also specify an aspect ratio for Grid to strive for with the GridRatio constructor:

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

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

data Grid a Source #

Automatic mirroring of hinted layouts doesn't work very well, so this `Grid` comes with built-in mirroring. `Grid False` is the normal layout, `Grid True` is the mirrored variant (rotated by 90 degrees).

Constructors

Grid Bool |
GridRatio Double Bool |

Instances

LayoutClass Grid Window Source # |

Instance details

Defined in XMonad.Layout.HintedGrid

Methods

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

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

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

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

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

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

description :: Grid Window -> String Source #

Read (Grid a) Source # |
Instance details Defined in XMonad.Layout.HintedGrid 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.HintedGrid Methods showsPrec :: Int -> Grid a -> ShowS Source # show :: Grid a -> String Source # showList :: [Grid a] -> ShowS Source #

arrange :: Double -> Bool -> Rectangle -> [Window] -> X [(Window, Rectangle)] Source #

The internal function for computing the grid layout.

defaultRatio :: Double Source #