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

Copyright | (c) Peter De Wachter <pdewacht@gmail.com>
License | BSD3-style (see LICENSE)
Maintainer | Peter De Wachter <pdewacht@gmail.com> Andrea Rossato <andrea.rossato@unibz.it>
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Layout.HintedTile

Contents

- Usage

Description

A gapless tiled layout that attempts to obey window size hints, rather than simply ignoring them.

Synopsis

- data HintedTile a = HintedTile {
  - nmaster :: !Int
  - delta :: !Rational
  - frac :: !Rational
  - alignment :: !Alignment
  - orientation :: !Orientation
  }
- data Orientation
  - = Wide
  - | Tall
- data Alignment
  - = TopLeft
  - | Center
  - | BottomRight

# Usage

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

    import XMonad.Layout.HintedTile

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

    myLayout = hintedTile Tall ||| hintedTile Wide ||| Full ||| etc..
      where
         hintedTile = HintedTile nmaster delta ratio TopLeft
         nmaster    = 1
         ratio      = 1/2
         delta      = 3/100
    main = xmonad def { layoutHook = myLayout }

Because both Xmonad and Xmonad.Layout.HintedTile define Tall, you need to disambiguate Tall. If you are replacing the built-in Tall with HintedTile, change `import Xmonad` to `import Xmonad hiding (Tall)`.

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

data HintedTile a Source #

Constructors

HintedTile |

Fields

- nmaster :: !Int

  number of windows in the master pane

- delta :: !Rational

  how much to change when resizing

- frac :: !Rational

  ratio between master/nonmaster panes

- alignment :: !Alignment

  Where to place windows that are smaller than their preordained rectangles.

- orientation :: !Orientation

  Tall or Wide (mirrored) layout?

#### Instances

Instances details

LayoutClass HintedTile Window Source # |

Instance details

Defined in XMonad.Layout.HintedTile

Methods

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

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

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

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

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

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

description :: HintedTile Window -> String Source #

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

data Orientation Source #

Constructors

Wide | Lay out windows similarly to Mirror tiled.
Tall | Lay out windows similarly to tiled.

#### Instances

Instances details

Read Orientation Source # |
Instance details Defined in XMonad.Layout.HintedTile Methods readsPrec :: Int -> ReadS Orientation Source # readList :: ReadS [Orientation] Source # readPrec :: ReadPrec Orientation Source # readListPrec :: ReadPrec [Orientation] Source #
Show Orientation Source # |
Instance details Defined in XMonad.Layout.HintedTile Methods showsPrec :: Int -> Orientation -> ShowS Source # show :: Orientation -> String Source # showList :: [Orientation] -> ShowS Source #
Eq Orientation Source # |
Instance details Defined in XMonad.Layout.HintedTile Methods (==) :: Orientation -> Orientation -> Bool Source # (/=) :: Orientation -> Orientation -> Bool Source #
Ord Orientation Source # |

Instance details

Defined in XMonad.Layout.HintedTile

Methods

compare :: Orientation -> Orientation -> Ordering Source #

(<) :: Orientation -> Orientation -> Bool Source #

(<=) :: Orientation -> Orientation -> Bool Source #

(>) :: Orientation -> Orientation -> Bool Source #

(>=) :: Orientation -> Orientation -> Bool Source #

max :: Orientation -> Orientation -> Orientation Source #

min :: Orientation -> Orientation -> Orientation Source #

data Alignment Source #

Constructors

TopLeft |
Center |
BottomRight |

#### Instances

Instances details

Read Alignment Source # |
Instance details Defined in XMonad.Layout.HintedTile Methods readsPrec :: Int -> ReadS Alignment Source # readList :: ReadS [Alignment] Source # readPrec :: ReadPrec Alignment Source # readListPrec :: ReadPrec [Alignment] Source #
Show Alignment Source # |
Instance details Defined in XMonad.Layout.HintedTile Methods showsPrec :: Int -> Alignment -> ShowS Source # show :: Alignment -> String Source # showList :: [Alignment] -> ShowS Source #
Eq Alignment Source # |
Instance details Defined in XMonad.Layout.HintedTile Methods (==) :: Alignment -> Alignment -> Bool Source # (/=) :: Alignment -> Alignment -> Bool Source #
Ord Alignment Source # |

Instance details

Defined in XMonad.Layout.HintedTile

Methods

compare :: Alignment -> Alignment -> Ordering Source #

(<) :: Alignment -> Alignment -> Bool Source #

(<=) :: Alignment -> Alignment -> Bool Source #

(>) :: Alignment -> Alignment -> Bool Source #

(>=) :: Alignment -> Alignment -> Bool Source #

max :: Alignment -> Alignment -> Alignment Source #

min :: Alignment -> Alignment -> Alignment Source #