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

Copyright | (c) 2009 Max Rabkin
License | BSD-style (see xmonad/LICENSE)
Maintainer | max.rabkin@gmail.com
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

XMonad.Layout.Drawer

Contents

- Usage
- Drawers
- Placing drawers

Description

A layout modifier that puts some windows in a "drawer" which retracts and expands depending on whether any window in it has focus.

Useful for music players, tool palettes, etc.

Synopsis

- simpleDrawer :: Rational -> Rational -> Property -> Drawer Tall a
- drawer :: Rational -> Rational -> Property -> l a -> Drawer l a
- onLeft :: forall (l :: Type -> Type) a l'. Drawer l a -> l' a -> ModifiedLayout (Drawer l) l' a
- onTop :: forall (l :: Type -> Type) a l'. Drawer l a -> l' a -> Mirror (ModifiedLayout (Drawer l) (Mirror l')) a
- onRight :: forall (l :: Type -> Type) a l'. Drawer l a -> l' a -> Reflected (ModifiedLayout (Drawer l) (Reflected l')) a
- onBottom :: forall (l :: Type -> Type) a l'. Drawer l a -> l' a -> Reflected (Mirror (ModifiedLayout (Drawer l) (Mirror (Reflected l')))) a
- module XMonad.Util.WindowProperties
- data Drawer (l :: Type -> Type) a
- type Reflected (l :: Type -> Type) = ModifiedLayout Reflect l

# Usage

To use this module, add the following import to `xmonad.hs`:

    import XMonad.Layout.Drawer

    myLayout = drawer `onTop` (Tall 1 0.03 0.5) ||| Full ||| RandomOtherLayout...
        where
            drawer = simpleDrawer 0.01 0.3 (ClassName "Rhythmbox" `Or` ClassName "Xchat")

    main = xmonad def { layoutHook = myLayout }

This will place the Rhythmbox and Xchat windows in at the top of the screen only when using the `Tall` layout. See XMonad.Util.WindowProperties for more information on selecting windows.

# Drawers

simpleDrawer Source #

Arguments

:: Rational | The portion of the screen taken up by the drawer when closed
-> Rational | The portion of the screen taken up by the drawer when open
-> Property | Which windows to put in the drawer
-> Drawer Tall a |

Construct a drawer with a simple layout of the windows inside

drawer Source #

Arguments

:: Rational | The portion of the screen taken up by the drawer when closed
-> Rational | The portion of the screen taken up by the drawer when open
-> Property | Which windows to put in the drawer
-> l a | The layout of windows in the drawer
-> Drawer l a |

Construct a drawer with an arbitrary layout for windows inside

# Placing drawers

onLeft :: forall (l :: Type -> Type) a l'. Drawer l a -> l' a -> ModifiedLayout (Drawer l) l' a Source #

onTop :: forall (l :: Type -> Type) a l'. Drawer l a -> l' a -> Mirror (ModifiedLayout (Drawer l) (Mirror l')) a Source #

onRight :: forall (l :: Type -> Type) a l'. Drawer l a -> l' a -> Reflected (ModifiedLayout (Drawer l) (Reflected l')) a Source #

onBottom :: forall (l :: Type -> Type) a l'. Drawer l a -> l' a -> Reflected (Mirror (ModifiedLayout (Drawer l) (Mirror (Reflected l')))) a Source #

module XMonad.Util.WindowProperties

data Drawer (l :: Type -> Type) a Source #

#### Instances

Instances details

(LayoutClass l Window, Read (l Window)) => LayoutModifier (Drawer l) Window Source # |

Instance details

Defined in XMonad.Layout.Drawer

Methods

modifyLayout :: LayoutClass l0 Window => Drawer l Window -> Workspace WorkspaceId (l0 Window) Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (l0 Window)) Source #

modifyLayoutWithUpdate :: LayoutClass l0 Window => Drawer l Window -> Workspace WorkspaceId (l0 Window) Window -> Rectangle -> X (([(Window, Rectangle)], Maybe (l0 Window)), Maybe (Drawer l Window)) Source #

handleMess :: Drawer l Window -> SomeMessage -> X (Maybe (Drawer l Window)) Source #

handleMessOrMaybeModifyIt :: Drawer l Window -> SomeMessage -> X (Maybe (Either (Drawer l Window) SomeMessage)) Source #

pureMess :: Drawer l Window -> SomeMessage -> Maybe (Drawer l Window) Source #

redoLayout :: Drawer l Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> X ([(Window, Rectangle)], Maybe (Drawer l Window)) Source #

pureModifier :: Drawer l Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> ([(Window, Rectangle)], Maybe (Drawer l Window)) Source #

hook :: Drawer l Window -> X () Source #

unhook :: Drawer l Window -> X () Source #

modifierDescription :: Drawer l Window -> String Source #

modifyDescription :: LayoutClass l0 Window => Drawer l Window -> l0 Window -> String Source #

Read (l a) => Read (Drawer l a) Source # |
Instance details Defined in XMonad.Layout.Drawer Methods readsPrec :: Int -> ReadS (Drawer l a) Source # readList :: ReadS [Drawer l a] Source # readPrec :: ReadPrec (Drawer l a) Source # readListPrec :: ReadPrec [Drawer l a] Source #
Show (l a) => Show (Drawer l a) Source # |
Instance details Defined in XMonad.Layout.Drawer Methods showsPrec :: Int -> Drawer l a -> ShowS Source # show :: Drawer l a -> String Source # showList :: [Drawer l a] -> ShowS Source #

type Reflected (l :: Type -> Type) = ModifiedLayout Reflect l Source #