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 #

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

data Spacing a #

Instances

LayoutModifier Spacing a # |
Methods modifyLayout :: LayoutClass l a => Spacing a -> Workspace WorkspaceId (l a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (l a)) # modifyLayoutWithUpdate :: LayoutClass l a => Spacing a -> Workspace WorkspaceId (l a) a -> Rectangle -> X (([(a, Rectangle)], Maybe (l a)), Maybe (Spacing a)) # handleMess :: Spacing a -> SomeMessage -> X (Maybe (Spacing a)) # handleMessOrMaybeModifyIt :: Spacing a -> SomeMessage -> X (Maybe (Either (Spacing a) SomeMessage)) # pureMess :: Spacing a -> SomeMessage -> Maybe (Spacing a) # redoLayout :: Spacing a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (Spacing a)) # pureModifier :: Spacing a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> ([(a, Rectangle)], Maybe (Spacing a)) # hook :: Spacing a -> X () # unhook :: Spacing a -> X () # modifierDescription :: Spacing a -> String # modifyDescription :: LayoutClass l a => Spacing a -> l a -> String #
Read (Spacing a) # |
Methods readsPrec :: Int -> ReadS (Spacing a) # readList :: ReadS [Spacing a] # readPrec :: ReadPrec (Spacing a) # readListPrec :: ReadPrec [Spacing a] #
Show (Spacing a) # |
Methods showsPrec :: Int -> Spacing a -> ShowS # show :: Spacing a -> String # showList :: [Spacing a] -> ShowS #

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

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 #

Instances

LayoutModifier SpacingWithEdge a # |
Methods modifyLayout :: LayoutClass l a => SpacingWithEdge a -> Workspace WorkspaceId (l a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (l a)) # modifyLayoutWithUpdate :: LayoutClass l a => SpacingWithEdge a -> Workspace WorkspaceId (l a) a -> Rectangle -> X (([(a, Rectangle)], Maybe (l a)), Maybe (SpacingWithEdge a)) # handleMess :: SpacingWithEdge a -> SomeMessage -> X (Maybe (SpacingWithEdge a)) # handleMessOrMaybeModifyIt :: SpacingWithEdge a -> SomeMessage -> X (Maybe (Either (SpacingWithEdge a) SomeMessage)) # pureMess :: SpacingWithEdge a -> SomeMessage -> Maybe (SpacingWithEdge a) # redoLayout :: SpacingWithEdge a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (SpacingWithEdge a)) # pureModifier :: SpacingWithEdge a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> ([(a, Rectangle)], Maybe (SpacingWithEdge a)) # hook :: SpacingWithEdge a -> X () # unhook :: SpacingWithEdge a -> X () # modifierDescription :: SpacingWithEdge a -> String # modifyDescription :: LayoutClass l a => SpacingWithEdge a -> l a -> String #
Read (SpacingWithEdge a) # |
Methods readsPrec :: Int -> ReadS (SpacingWithEdge a) # readList :: ReadS [SpacingWithEdge a] # readPrec :: ReadPrec (SpacingWithEdge a) # readListPrec :: ReadPrec [SpacingWithEdge a] #
Show (SpacingWithEdge a) # |
Methods showsPrec :: Int -> SpacingWithEdge a -> ShowS # show :: SpacingWithEdge a -> String # showList :: [SpacingWithEdge a] -> ShowS #

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

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

data SmartSpacing a #

Instances

LayoutModifier SmartSpacing a # |
Methods modifyLayout :: LayoutClass l a => SmartSpacing a -> Workspace WorkspaceId (l a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (l a)) # modifyLayoutWithUpdate :: LayoutClass l a => SmartSpacing a -> Workspace WorkspaceId (l a) a -> Rectangle -> X (([(a, Rectangle)], Maybe (l a)), Maybe (SmartSpacing a)) # handleMess :: SmartSpacing a -> SomeMessage -> X (Maybe (SmartSpacing a)) # handleMessOrMaybeModifyIt :: SmartSpacing a -> SomeMessage -> X (Maybe (Either (SmartSpacing a) SomeMessage)) # pureMess :: SmartSpacing a -> SomeMessage -> Maybe (SmartSpacing a) # redoLayout :: SmartSpacing a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (SmartSpacing a)) # pureModifier :: SmartSpacing a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> ([(a, Rectangle)], Maybe (SmartSpacing a)) # hook :: SmartSpacing a -> X () # unhook :: SmartSpacing a -> X () # modifierDescription :: SmartSpacing a -> String # modifyDescription :: LayoutClass l a => SmartSpacing a -> l a -> String #
Read (SmartSpacing a) # |
Methods readsPrec :: Int -> ReadS (SmartSpacing a) # readList :: ReadS [SmartSpacing a] # readPrec :: ReadPrec (SmartSpacing a) # readListPrec :: ReadPrec [SmartSpacing a] #
Show (SmartSpacing a) # |
Methods showsPrec :: Int -> SmartSpacing a -> ShowS # show :: SmartSpacing a -> String # showList :: [SmartSpacing a] -> ShowS #

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

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 #

Instances

LayoutModifier SmartSpacingWithEdge a # |
Methods modifyLayout :: LayoutClass l a => SmartSpacingWithEdge a -> Workspace WorkspaceId (l a) a -> Rectangle -> X ([(a, Rectangle)], Maybe (l a)) # modifyLayoutWithUpdate :: LayoutClass l a => SmartSpacingWithEdge a -> Workspace WorkspaceId (l a) a -> Rectangle -> X (([(a, Rectangle)], Maybe (l a)), Maybe (SmartSpacingWithEdge a)) # handleMess :: SmartSpacingWithEdge a -> SomeMessage -> X (Maybe (SmartSpacingWithEdge a)) # handleMessOrMaybeModifyIt :: SmartSpacingWithEdge a -> SomeMessage -> X (Maybe (Either (SmartSpacingWithEdge a) SomeMessage)) # pureMess :: SmartSpacingWithEdge a -> SomeMessage -> Maybe (SmartSpacingWithEdge a) # redoLayout :: SmartSpacingWithEdge a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (SmartSpacingWithEdge a)) # pureModifier :: SmartSpacingWithEdge a -> Rectangle -> Maybe (Stack a) -> [(a, Rectangle)] -> ([(a, Rectangle)], Maybe (SmartSpacingWithEdge a)) # hook :: SmartSpacingWithEdge a -> X () # unhook :: SmartSpacingWithEdge a -> X () # modifierDescription :: SmartSpacingWithEdge a -> String # modifyDescription :: LayoutClass l a => SmartSpacingWithEdge a -> l a -> String #
Read (SmartSpacingWithEdge a) # |
Methods readsPrec :: Int -> ReadS (SmartSpacingWithEdge a) # readList :: ReadS [SmartSpacingWithEdge a] # readPrec :: ReadPrec (SmartSpacingWithEdge a) # readListPrec :: ReadPrec [SmartSpacingWithEdge a] #
Show (SmartSpacingWithEdge a) # |
Methods showsPrec :: Int -> SmartSpacingWithEdge a -> ShowS # show :: SmartSpacingWithEdge a -> String # showList :: [SmartSpacingWithEdge a] -> ShowS #

data ModifySpacing #

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

Constructors

ModifySpacing (Int -> Int) |

Instances

Message ModifySpacing # |

setSpacing :: Int -> X () #

Set spacing to given amount

incSpacing :: Int -> X () #

Increase spacing by given amount