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

Copyright | (c) 2007 Andrea Rossato
License | BSD-style (see xmonad/LICENSE)
Maintainer | andrea.rossato@unibz.it
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Layout.SimpleFloat

Contents

- Usage:

Description

A basic floating layout.

Synopsis

- simpleFloat :: Eq a => ModifiedLayout (Decoration SimpleDecoration DefaultShrinker) (ModifiedLayout MouseResize (ModifiedLayout WindowArranger SimpleFloat)) a
- simpleFloat' :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration SimpleDecoration s) (ModifiedLayout MouseResize (ModifiedLayout WindowArranger SimpleFloat)) a
- newtype SimpleDecoration a = Simple Bool
- newtype SimpleFloat a = SF Dimension
- shrinkText :: DefaultShrinker
- data CustomShrink = CustomShrink
- class (Read s, Show s) => Shrinker s where
  - shrinkIt :: s -> String -> [String]

# Usage:

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

    import XMonad.Layout.SimpleFloat

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

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

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

simpleFloat :: Eq a => ModifiedLayout (Decoration SimpleDecoration DefaultShrinker) (ModifiedLayout MouseResize (ModifiedLayout WindowArranger SimpleFloat)) a Source #

A simple floating layout where every window is placed according to the window's initial attributes.

This version is decorated with the `SimpleDecoration` style.

simpleFloat' :: (Eq a, Shrinker s) => s -> Theme -> ModifiedLayout (Decoration SimpleDecoration s) (ModifiedLayout MouseResize (ModifiedLayout WindowArranger SimpleFloat)) a Source #

Same as `simpleFloat`, but with the possibility of setting a custom shrinker and a custom theme.

newtype SimpleDecoration a Source #

Constructors

Simple Bool |

#### Instances

Instances details

Eq a => DecorationStyle SimpleDecoration a Source # |

Instance details

Defined in XMonad.Layout.SimpleDecoration

Methods

describeDeco :: SimpleDecoration a -> String Source #

shrink :: SimpleDecoration a -> Rectangle -> Rectangle -> Rectangle Source #

decorationEventHook :: SimpleDecoration a -> DecorationState -> Event -> X () Source #

decorationCatchClicksHook :: SimpleDecoration a -> Window -> Int -> Int -> X Bool Source #

decorationWhileDraggingHook :: SimpleDecoration a -> CInt -> CInt -> (Window, Rectangle) -> Position -> Position -> X () Source #

decorationAfterDraggingHook :: SimpleDecoration a -> (Window, Rectangle) -> Window -> X () Source #

pureDecoration :: SimpleDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> Maybe Rectangle Source #

decorate :: SimpleDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> X (Maybe Rectangle) Source #

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

newtype SimpleFloat a Source #

Constructors

SF Dimension |

#### Instances

Instances details

LayoutClass SimpleFloat Window Source # |

Instance details

Defined in XMonad.Layout.SimpleFloat

Methods

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

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

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

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

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

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

description :: SimpleFloat Window -> String Source #

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

shrinkText :: DefaultShrinker Source #

data CustomShrink Source #

Constructors

CustomShrink |

#### Instances

Instances details

Read CustomShrink Source # |
Instance details Defined in XMonad.Layout.Decoration Methods readsPrec :: Int -> ReadS CustomShrink Source # readList :: ReadS [CustomShrink] Source # readPrec :: ReadPrec CustomShrink Source # readListPrec :: ReadPrec [CustomShrink] Source #
Show CustomShrink Source # |
Instance details Defined in XMonad.Layout.Decoration Methods showsPrec :: Int -> CustomShrink -> ShowS Source # show :: CustomShrink -> String Source # showList :: [CustomShrink] -> ShowS Source #
Shrinker CustomShrink Source # |
Instance details Defined in XMonad.Config.Droundy Methods shrinkIt :: CustomShrink -> String -> [String] Source #

class (Read s, Show s) => Shrinker s where Source #

Methods

shrinkIt :: s -> String -> [String] Source #

#### Instances

Instances details

Shrinker CustomShrink Source # |
Instance details Defined in XMonad.Config.Droundy Methods shrinkIt :: CustomShrink -> String -> [String] Source #
Shrinker DefaultShrinker Source # |
Instance details Defined in XMonad.Layout.Decoration Methods shrinkIt :: DefaultShrinker -> String -> [String] Source #