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

Copyright | (c) Jan Vornberger 2009
License | BSD3-style (see LICENSE)
Maintainer | jan.vornberger@informatik.uni-oldenburg.de
Stability | unstable
Portability | not portable
Safe Haskell | None
Language | Haskell2010

XMonad.Layout.BorderResize

Contents

- Usage

Description

This layout modifier will allow to resize windows by dragging their borders with the mouse. However, it only works in layouts or modified layouts that react to the `SetGeometry` message. XMonad.Layout.WindowArranger can be used to create such a setup, but it is probably must useful in a floating layout such as XMonad.Layout.PositionStoreFloat with which it has been mainly tested. See the documentation of PositionStoreFloat for a typical usage example.

Synopsis

- borderResize :: l a -> ModifiedLayout BorderResize l a
- borderResizeNear :: Dimension -> l a -> ModifiedLayout BorderResize l a
- data BorderResize a = BR {
  - brBorderSize :: !Dimension
  - brWrsLastTime :: !(Map Window RectWithBorders)
  }
- type RectWithBorders = (Rectangle, [BorderInfo])
- data BorderInfo

# Usage

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

    import XMonad.Layout.BorderResize
    myLayout = borderResize (... layout setup that reacts to SetGeometry ...)
    main = xmonad def { layoutHook = myLayout }

borderResize :: l a -> ModifiedLayout BorderResize l a #

borderResizeNear :: Dimension -> l a -> ModifiedLayout BorderResize l a #

Like `borderResize`, but takes the number of pixels near the border up to which dragging still resizes a window.

data BorderResize a #

Constructors

BR |
Fields brBorderSize :: !Dimension Still resize when this number of pixels around the border. brWrsLastTime :: !(Map Window RectWithBorders)

#### Instances

Instances details

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

type RectWithBorders = (Rectangle, [BorderInfo]) #

data BorderInfo #

#### Instances

Instances details

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