xmonad-contrib-0.13: Third party extensions for xmonad

Copyright | (c) Brent Yorgey
License | BSD-style (see LICENSE)
Maintainer | <byorgey@gmail.com>
Stability | unstable
Portability | portable
Safe Haskell | None
Language | Haskell98

XMonad.Layout.Spacing

Contents

- Usage

Description

Add a configurable amount of space around windows.

Synopsis

- spacing :: Int -> l a -> ModifiedLayout Spacing l a
- data Spacing a
- spacingWithEdge :: Int -> l a -> ModifiedLayout SpacingWithEdge l a
- data SpacingWithEdge a
- smartSpacing :: Int -> l a -> ModifiedLayout SmartSpacing l a
- data SmartSpacing a
- smartSpacingWithEdge :: Int -> l a -> ModifiedLayout SmartSpacingWithEdge l a
- data SmartSpacingWithEdge a
- data ModifySpacing = ModifySpacing (Int -> Int)
- setSpacing :: Int -> X ()
- incSpacing :: Int -> X ()

# Usage

You can use this module by importing it into your `~/.xmonad/xmonad.hs` file:

    import XMonad.Layout.Spacing

and modifying your layoutHook as follows (for example):

    layoutHook = spacing 2 $ Tall 1 (3/100) (1/2)
                         -- put a 2px space around every window

spacing :: Int -> l a -> ModifiedLayout Spacing l a Source #

Surround all windows by a certain number of pixels of blank space.

data Spacing a Source #

Instances

LayoutModifier Spacing a Source # |

Methods

modifyLayout :: LayoutClass l a => Spacing a -> Workspace WorkspaceId (l a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (l a)) Source #

modifyLayoutWithUpdate :: LayoutClass l a => Spacing a -> Workspace WorkspaceId (l a) a -> Rectangle -> X (([(a, Rectangle)], Maybe (l a)), Maybe (Spacing a)) Source #

handleMess :: Spacing a -> SomeMessage -> X (Maybe (Spacing a)) Source #

handleMessOrMaybeModifyIt :: Spacing a -> SomeMessage -> X (Maybe (Either (Spacing a) SomeMessage)) Source #

pureMess :: Spacing a -> SomeMessage -> Maybe (Spacing a) Source #

redoLayout :: Spacing a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (Spacing a)) Source #

pureModifier :: Spacing a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> ([(a, Rectangle)], Maybe (Spacing a)) Source #

hook :: Spacing a -> X () Source #

unhook :: Spacing a -> X () Source #

modifierDescription :: Spacing a -> String Source #

modifyDescription :: LayoutClass l a => Spacing a -> l a -> String Source #

Read (Spacing a) Source # |
Methods readsPrec :: Int -> ReadS (Spacing a) # readList :: ReadS [Spacing a] # readPrec :: ReadPrec (Spacing a) # readListPrec :: ReadPrec [Spacing a] #
Show (Spacing a) Source # |
Methods showsPrec :: Int -> Spacing a -> ShowS # show :: Spacing a -> String # showList :: [Spacing a] -> ShowS #

spacingWithEdge :: Int -> l a -> ModifiedLayout SpacingWithEdge l a Source #

Surround all windows by a certain number of pixels of blank space, and additionally adds the same amount of spacing around the edge of the screen.

data SpacingWithEdge a Source #

Instances

LayoutModifier SpacingWithEdge a Source # |

Methods

modifyLayout :: LayoutClass l a => SpacingWithEdge a -> Workspace WorkspaceId (l a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (l a)) Source #

modifyLayoutWithUpdate :: LayoutClass l a => SpacingWithEdge a -> Workspace WorkspaceId (l a) a -> Rectangle -> X (([(a, Rectangle)], Maybe (l a)), Maybe (SpacingWithEdge a)) Source #

handleMess :: SpacingWithEdge a -> SomeMessage -> X (Maybe (SpacingWithEdge a)) Source #

handleMessOrMaybeModifyIt :: SpacingWithEdge a -> SomeMessage -> X (Maybe (Either (SpacingWithEdge a) SomeMessage)) Source #

pureMess :: SpacingWithEdge a -> SomeMessage -> Maybe (SpacingWithEdge a) Source #

redoLayout :: SpacingWithEdge a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (SpacingWithEdge a)) Source #

pureModifier :: SpacingWithEdge a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> ([(a, Rectangle)], Maybe (SpacingWithEdge a)) Source #

hook :: SpacingWithEdge a -> X () Source #

unhook :: SpacingWithEdge a -> X () Source #

modifierDescription :: SpacingWithEdge a -> String Source #

modifyDescription :: LayoutClass l a => SpacingWithEdge a -> l a -> String Source #

Read (SpacingWithEdge a) Source # |
Methods readsPrec :: Int -> ReadS (SpacingWithEdge a) # readList :: ReadS [SpacingWithEdge a] # readPrec :: ReadPrec (SpacingWithEdge a) # readListPrec :: ReadPrec [SpacingWithEdge a] #
Show (SpacingWithEdge a) Source # |
Methods showsPrec :: Int -> SpacingWithEdge a -> ShowS # show :: SpacingWithEdge a -> String # showList :: [SpacingWithEdge a] -> ShowS #

smartSpacing :: Int -> l a -> ModifiedLayout SmartSpacing l a Source #

Surrounds all windows with blank space, except when the window is the only visible window on the current workspace.

data SmartSpacing a Source #

Instances

LayoutModifier SmartSpacing a Source # |

Methods

modifyLayout :: LayoutClass l a => SmartSpacing a -> Workspace WorkspaceId (l a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (l a)) Source #

modifyLayoutWithUpdate :: LayoutClass l a => SmartSpacing a -> Workspace WorkspaceId (l a) a -> Rectangle -> X (([(a, Rectangle)], Maybe (l a)), Maybe (SmartSpacing a)) Source #

handleMess :: SmartSpacing a -> SomeMessage -> X (Maybe (SmartSpacing a)) Source #

handleMessOrMaybeModifyIt :: SmartSpacing a -> SomeMessage -> X (Maybe (Either (SmartSpacing a) SomeMessage)) Source #

pureMess :: SmartSpacing a -> SomeMessage -> Maybe (SmartSpacing a) Source #

redoLayout :: SmartSpacing a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (SmartSpacing a)) Source #

pureModifier :: SmartSpacing a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> ([(a, Rectangle)], Maybe (SmartSpacing a)) Source #

hook :: SmartSpacing a -> X () Source #

unhook :: SmartSpacing a -> X () Source #

modifierDescription :: SmartSpacing a -> String Source #

modifyDescription :: LayoutClass l a => SmartSpacing a -> l a -> String Source #

Read (SmartSpacing a) Source # |
Methods readsPrec :: Int -> ReadS (SmartSpacing a) # readList :: ReadS [SmartSpacing a] # readPrec :: ReadPrec (SmartSpacing a) # readListPrec :: ReadPrec [SmartSpacing a] #
Show (SmartSpacing a) Source # |
Methods showsPrec :: Int -> SmartSpacing a -> ShowS # show :: SmartSpacing a -> String # showList :: [SmartSpacing a] -> ShowS #

smartSpacingWithEdge :: Int -> l a -> ModifiedLayout SmartSpacingWithEdge l a Source #

Surrounds all windows with blank space, and adds the same amount of spacing around the edge of the screen, except when the window is the only visible window on the current workspace.

data SmartSpacingWithEdge a Source #

Instances

LayoutModifier SmartSpacingWithEdge a Source # |

Methods

modifyLayout :: LayoutClass l a => SmartSpacingWithEdge a -> Workspace WorkspaceId (l a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (l a)) Source #

modifyLayoutWithUpdate :: LayoutClass l a => SmartSpacingWithEdge a -> Workspace WorkspaceId (l a) a -> Rectangle -> X (([(a, Rectangle)], Maybe (l a)), Maybe (SmartSpacingWithEdge a)) Source #

handleMess :: SmartSpacingWithEdge a -> SomeMessage -> X (Maybe (SmartSpacingWithEdge a)) Source #

handleMessOrMaybeModifyIt :: SmartSpacingWithEdge a -> SomeMessage -> X (Maybe (Either (SmartSpacingWithEdge a) SomeMessage)) Source #

pureMess :: SmartSpacingWithEdge a -> SomeMessage -> Maybe (SmartSpacingWithEdge a) Source #

redoLayout :: SmartSpacingWithEdge a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (SmartSpacingWithEdge a)) Source #

pureModifier :: SmartSpacingWithEdge a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> ([(a, Rectangle)], Maybe (SmartSpacingWithEdge a)) Source #

hook :: SmartSpacingWithEdge a -> X () Source #

unhook :: SmartSpacingWithEdge a -> X () Source #

modifierDescription :: SmartSpacingWithEdge a -> String Source #

modifyDescription :: LayoutClass l a => SmartSpacingWithEdge a -> l a -> String Source #

Read (SmartSpacingWithEdge a) Source # |
Methods readsPrec :: Int -> ReadS (SmartSpacingWithEdge a) # readList :: ReadS [SmartSpacingWithEdge a] # readPrec :: ReadPrec (SmartSpacingWithEdge a) # readListPrec :: ReadPrec [SmartSpacingWithEdge a] #
Show (SmartSpacingWithEdge a) Source # |
Methods showsPrec :: Int -> SmartSpacingWithEdge a -> ShowS # show :: SmartSpacingWithEdge a -> String # showList :: [SmartSpacingWithEdge a] -> ShowS #

data ModifySpacing Source #

Message to dynamically modify (e.g. increasedecreaseset) the size of the window spacing

Constructors

ModifySpacing (Int -> Int) |

Instances

Message ModifySpacing Source # |

setSpacing :: Int -> X () Source #

Set spacing to given amount

incSpacing :: Int -> X () Source #

Increase spacing by given amount