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

Copyright | (c) Jan Vornberger 2009 Alejandro Serrano 2010
License | BSD3-style (see LICENSE)
Maintainer | trupill@gmail.com
Stability | unstable
Portability | not portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

XMonad.Layout.ImageButtonDecoration

Contents

- Usage:

Description

A decoration that includes small image buttons on both ends which invoke various actions when clicked on: Show a window menu (see XMonad.Actions.WindowMenu), minimize, maximize or close the window.

Note: For maximizing and minimizing to actually work, you will need to integrate XMonad.Layout.Maximize and XMonad.Layout.Minimize into your setup. See the documentation of those modules for more information.

Synopsis

- imageButtonDeco :: (Eq a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration ImageButtonDecoration s) l a
- defaultThemeWithImageButtons :: Theme
- shrinkText :: DefaultShrinker
- data CustomShrink = CustomShrink
- class (Read s, Show s) => Shrinker s
- imageTitleBarButtonHandler :: Window -> Int -> Int -> X Bool
- data ImageButtonDecoration a

# Usage:

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

    import XMonad.Layout.ImageButtonDecoration

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

    myL = imageButtonDeco shrinkText defaultThemeWithImageButtons (layoutHook def)
    main = xmonad def { layoutHook = myL }

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

defaultThemeWithImageButtons :: Theme #

shrinkText :: DefaultShrinker #

data CustomShrink #

Constructors

CustomShrink |

#### Instances

Instances details

Read CustomShrink # |
Instance details Defined in XMonad.Layout.Decoration Methods readsPrec :: Int -> ReadS CustomShrink # readList :: ReadS [CustomShrink] # readPrec :: ReadPrec CustomShrink readListPrec :: ReadPrec [CustomShrink]
Show CustomShrink # |
Instance details Defined in XMonad.Layout.Decoration Methods showsPrec :: Int -> CustomShrink -> ShowS # show :: CustomShrink -> String # showList :: [CustomShrink] -> ShowS #
Shrinker CustomShrink # |
Instance details Defined in XMonad.Config.Droundy Methods shrinkIt :: CustomShrink -> String -> [String] #

class (Read s, Show s) => Shrinker s #

Minimal complete definition

shrinkIt

#### Instances

Instances details

Shrinker CustomShrink # |
Instance details Defined in XMonad.Config.Droundy Methods shrinkIt :: CustomShrink -> String -> [String] #
Shrinker DefaultShrinker # |
Instance details Defined in XMonad.Layout.Decoration Methods shrinkIt :: DefaultShrinker -> String -> [String] #

imageTitleBarButtonHandler :: Window -> Int -> Int -> X Bool #

A function intended to be plugged into the `decorationCatchClicksHook` of a decoration. It will intercept clicks on the buttons of the decoration and invoke the associated action. To actually see the buttons, you will need to use a theme that includes them. See `defaultThemeWithImageButtons` below.

data ImageButtonDecoration a #

#### Instances

Instances details

Eq a => DecorationStyle ImageButtonDecoration a # |

Instance details

Defined in XMonad.Layout.ImageButtonDecoration

Methods

describeDeco :: ImageButtonDecoration a -> String #

shrink :: ImageButtonDecoration a -> Rectangle -> Rectangle -> Rectangle #

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

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

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

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

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

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

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