xmonad-contrib-0.7: Third party extensions for xmonadContentsIndex
XMonad.Layout.WindowArranger
Portabilityunportable
Stabilityunstable
Maintainerandrea.rossato@unibz.it
Contents
Usage
Description
This is a pure layout modifier that will let you move and resize windows with the keyboard in any layout.
Synopsis
windowArrange :: l a -> ModifiedLayout WindowArranger l a
windowArrangeAll :: l a -> ModifiedLayout WindowArranger l a
data WindowArrangerMsg
= DeArrange
| Arrange
| IncreaseLeft Int
| IncreaseRight Int
| IncreaseUp Int
| IncreaseDown Int
| DecreaseLeft Int
| DecreaseRight Int
| DecreaseUp Int
| DecreaseDown Int
| MoveLeft Int
| MoveRight Int
| MoveUp Int
| MoveDown Int
| SetGeometry Rectangle
data WindowArranger a
memberFromList :: (b -> c) -> (c -> a -> Bool) -> a -> [b] -> [b]
listFromList :: (b -> c) -> (c -> [a] -> Bool) -> [a] -> [b] -> [b]
diff :: Eq a => ([a], [a]) -> ([a], [a])
Usage

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

 import XMonad.Layout.WindowArranger
 myLayout = layoutHook defaultConfig
 main = xmonad defaultConfig { layoutHook = windowArrange myLayout }

or

 main = xmonad defaultConfig { layoutHook = windowArrangeAll myLayout }

For more detailed instructions on editing the layoutHook see:

XMonad.Doc.Extending#Editing_the_layout_hook

You may also want to define some key binding to move or resize windows. These are good defaults:

        , ((modMask x .|. controlMask              , xK_s    ), sendMessage  Arrange         )
        , ((modMask x .|. controlMask .|. shiftMask, xK_s    ), sendMessage  DeArrange       )
        , ((modMask x .|. controlMask              , xK_Left ), sendMessage (MoveLeft      1))
        , ((modMask x .|. controlMask              , xK_Right), sendMessage (MoveRight     1))
        , ((modMask x .|. controlMask              , xK_Down ), sendMessage (MoveDown      1))
        , ((modMask x .|. controlMask              , xK_Up   ), sendMessage (MoveUp        1))
        , ((modMask x                 .|. shiftMask, xK_Left ), sendMessage (IncreaseLeft  1))
        , ((modMask x                 .|. shiftMask, xK_Right), sendMessage (IncreaseRight 1))
        , ((modMask x                 .|. shiftMask, xK_Down ), sendMessage (IncreaseDown  1))
        , ((modMask x                 .|. shiftMask, xK_Up   ), sendMessage (IncreaseUp    1))
        , ((modMask x .|. controlMask .|. shiftMask, xK_Left ), sendMessage (DecreaseLeft  1))
        , ((modMask x .|. controlMask .|. shiftMask, xK_Right), sendMessage (DecreaseRight 1))
        , ((modMask x .|. controlMask .|. shiftMask, xK_Down ), sendMessage (DecreaseDown  1))
        , ((modMask x .|. controlMask .|. shiftMask, xK_Up   ), sendMessage (DecreaseUp    1))

For detailed instructions on editing your key bindings, see XMonad.Doc.Extending#Editing_key_bindings.

windowArrange :: l a -> ModifiedLayout WindowArranger l a
A layout modifier to float the windows in a workspace
windowArrangeAll :: l a -> ModifiedLayout WindowArranger l a
A layout modifier to float all the windows in a workspace
data WindowArrangerMsg
Constructors
DeArrange
Arrange
IncreaseLeft Int
IncreaseRight Int
IncreaseUp Int
IncreaseDown Int
DecreaseLeft Int
DecreaseRight Int
DecreaseUp Int
DecreaseDown Int
MoveLeft Int
MoveRight Int
MoveUp Int
MoveDown Int
SetGeometry Rectangle
show/hide Instances
data WindowArranger a
show/hide Instances
memberFromList :: (b -> c) -> (c -> a -> Bool) -> a -> [b] -> [b]
Given a function to be applied to each member of ta list, and a function to check a condition by processing this transformed member with something, you get the first member that satisfy the condition, or an empty list.
listFromList :: (b -> c) -> (c -> [a] -> Bool) -> [a] -> [b] -> [b]
Given a function to be applied to each member of a list, and a function to check a condition by processing this transformed member with the members of a list, you get the list of members that satisfy the condition.
diff :: Eq a => ([a], [a]) -> ([a], [a])
Get the list of elements to be deleted and the list ef elements to be added to the first list in order to get the second list.
Produced by Haddock version 0.8