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

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

XMonad.Layout.WindowSwitcherDecoration

Contents

- Usage:

Description

A decoration that allows to switch the position of windows by dragging them onto each other.

Synopsis

- windowSwitcherDecoration :: (Eq a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration WindowSwitcherDecoration s) l a
- windowSwitcherDecorationWithButtons :: (Eq a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration WindowSwitcherDecoration s) l a
- windowSwitcherDecorationWithImageButtons :: (Eq a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration ImageWindowSwitcherDecoration s) l a
- data WindowSwitcherDecoration a
- data ImageWindowSwitcherDecoration a

# Usage:

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

    import XMonad.Layout.WindowSwitcherDecoration
    import XMonad.Layout.DraggingVisualizer

Then edit your `layoutHook` by adding the WindowSwitcherDecoration to your layout:

    myL = windowSwitcherDecoration shrinkText def (draggingVisualizer $ layoutHook def)
    main = xmonad def { layoutHook = myL }

There is also a version of the decoration that contains buttons like XMonad.Layout.ButtonDecoration. To use that version, you will need to import XMonad.Layout.DecorationAddons as well and modify your `layoutHook` in the following way:

    import XMonad.Layout.DecorationAddons

    myL = windowSwitcherDecorationWithButtons shrinkText defaultThemeWithButtons (draggingVisualizer $ layoutHook def)
    main = xmonad def { layoutHook = myL }

Additionaly, there is a version of the decoration that contains image buttons like XMonad.Layout.ImageButtonDecoration. To use that version, you will need to import XMonad.Layout.ImageButtonDecoration as well and modify your `layoutHook` in the following way:

    import XMonad.Layout.ImageButtonDecoration

    myL = windowSwitcherDecorationWithImageButtons shrinkText defaultThemeWithImageButtons (draggingVisualizer $ layoutHook def)
    main = xmonad def { layoutHook = myL }

windowSwitcherDecoration :: (Eq a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration WindowSwitcherDecoration s) l a #

windowSwitcherDecorationWithButtons :: (Eq a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration WindowSwitcherDecoration s) l a #

windowSwitcherDecorationWithImageButtons :: (Eq a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration ImageWindowSwitcherDecoration s) l a #

data WindowSwitcherDecoration a #

#### Instances

Instances details

Eq a => DecorationStyle WindowSwitcherDecoration a # |

Instance details

Defined in XMonad.Layout.WindowSwitcherDecoration

Methods

describeDeco :: WindowSwitcherDecoration a -> String #

shrink :: WindowSwitcherDecoration a -> Rectangle -> Rectangle -> Rectangle #

decorationEventHook :: WindowSwitcherDecoration a -> DecorationState -> Event -> X () #

decorationCatchClicksHook :: WindowSwitcherDecoration a -> Window -> Int -> Int -> X Bool #

decorationWhileDraggingHook :: WindowSwitcherDecoration a -> CInt -> CInt -> (Window, Rectangle) -> Position -> Position -> X () #

decorationAfterDraggingHook :: WindowSwitcherDecoration a -> (Window, Rectangle) -> Window -> X () #

pureDecoration :: WindowSwitcherDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> Maybe Rectangle #

decorate :: WindowSwitcherDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> X (Maybe Rectangle) #

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

data ImageWindowSwitcherDecoration a #

#### Instances

Instances details

Eq a => DecorationStyle ImageWindowSwitcherDecoration a # |

Instance details

Defined in XMonad.Layout.WindowSwitcherDecoration

Methods

describeDeco :: ImageWindowSwitcherDecoration a -> String #

shrink :: ImageWindowSwitcherDecoration a -> Rectangle -> Rectangle -> Rectangle #

decorationEventHook :: ImageWindowSwitcherDecoration a -> DecorationState -> Event -> X () #

decorationCatchClicksHook :: ImageWindowSwitcherDecoration a -> Window -> Int -> Int -> X Bool #

decorationWhileDraggingHook :: ImageWindowSwitcherDecoration a -> CInt -> CInt -> (Window, Rectangle) -> Position -> Position -> X () #

decorationAfterDraggingHook :: ImageWindowSwitcherDecoration a -> (Window, Rectangle) -> Window -> X () #

pureDecoration :: ImageWindowSwitcherDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> Maybe Rectangle #

decorate :: ImageWindowSwitcherDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> X (Maybe Rectangle) #

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