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 | unportable
Safe Haskell | None
Language | Haskell98

XMonad.Layout.Reflect

Contents

- Usage

Description

Reflect a layout horizontally or vertically.

Synopsis

- reflectHoriz :: l a -> ModifiedLayout Reflect l a
- reflectVert :: l a -> ModifiedLayout Reflect l a
- data REFLECTX = REFLECTX
- data REFLECTY = REFLECTY
- data Reflect a

# Usage

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

    import XMonad.Layout.Reflect

and modifying your layoutHook as follows (for example):

    layoutHook = reflectHoriz $ Tall 1 (3/100) (1/2)  -- put master pane on the right

`reflectHoriz` and `reflectVert` can be applied to any sort of layout (including Mirrored layouts) and will simply flip the physical layout of the windows vertically or horizontally.

XMonad.Layout.MultiToggle transformers are also provided for toggling layouts between reflected/non-reflected with a keybinding. To use this feature, you will also need to import the MultiToggle module:

    import XMonad.Layout.MultiToggle

Next, add one or more toggles to your layout. For example, to allow separate toggling of both vertical and horizontal reflection:

    layoutHook = mkToggle (single REFLECTX) $
                 mkToggle (single REFLECTY) $
                   (tiled ||| Mirror tiled ||| ...) -- whatever layouts you use

Finally, add some keybindings to do the toggling, for example:

    , ((modm .|. controlMask, xK_x), sendMessage $ Toggle REFLECTX)
    , ((modm .|. controlMask, xK_y), sendMessage $ Toggle REFLECTY)

reflectHoriz :: l a -> ModifiedLayout Reflect l a Source #

Apply a horizontal reflection (left <--> right) to a layout.

reflectVert :: l a -> ModifiedLayout Reflect l a Source #

Apply a vertical reflection (top <--> bottom) to a layout.

data REFLECTX Source #

Constructors

REFLECTX |

Instances

Eq REFLECTX Source # |
Methods (==) :: REFLECTX -> REFLECTX -> Bool # (/=) :: REFLECTX -> REFLECTX -> Bool #
Read REFLECTX Source # |
Methods readsPrec :: Int -> ReadS REFLECTX # readList :: ReadS [REFLECTX] # readPrec :: ReadPrec REFLECTX # readListPrec :: ReadPrec [REFLECTX] #
Show REFLECTX Source # |
Methods showsPrec :: Int -> REFLECTX -> ShowS # show :: REFLECTX -> String # showList :: [REFLECTX] -> ShowS #
Transformer REFLECTX Window Source # |
Methods transform :: LayoutClass l Window => REFLECTX -> l Window -> (forall l'. LayoutClass l' Window => l' Window -> (l' Window -> l Window) -> b) -> b Source #

data REFLECTY Source #

Constructors

REFLECTY |

Instances

Eq REFLECTY Source # |
Methods (==) :: REFLECTY -> REFLECTY -> Bool # (/=) :: REFLECTY -> REFLECTY -> Bool #
Read REFLECTY Source # |
Methods readsPrec :: Int -> ReadS REFLECTY # readList :: ReadS [REFLECTY] # readPrec :: ReadPrec REFLECTY # readListPrec :: ReadPrec [REFLECTY] #
Show REFLECTY Source # |
Methods showsPrec :: Int -> REFLECTY -> ShowS # show :: REFLECTY -> String # showList :: [REFLECTY] -> ShowS #
Transformer REFLECTY Window Source # |
Methods transform :: LayoutClass l Window => REFLECTY -> l Window -> (forall l'. LayoutClass l' Window => l' Window -> (l' Window -> l Window) -> b) -> b Source #

data Reflect a Source #

Instances

LayoutModifier Reflect a Source # |

Methods

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

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

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

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

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

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

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

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

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

modifierDescription :: Reflect a -> String Source #

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

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