xmonad-contrib-0.13: Third party extensions for xmonad

Copyright | (c) 2007 Andrea Rossato
License | BSD-style (see xmonad/LICENSE)
Maintainer | andrea.rossato@unibz.it
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell98

XMonad.Layout.SimpleDecoration

Contents

- Usage:

Description

A layout modifier for adding simple decorations to the windows of a given layout. The decorations are in the form of ion-like tabs for window titles.

Synopsis

- simpleDeco :: (Eq a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration SimpleDecoration s) l a
- data Theme = Theme {
  - activeColor :: String
  - inactiveColor :: String
  - urgentColor :: String
  - activeBorderColor :: String
  - inactiveBorderColor :: String
  - urgentBorderColor :: String
  - activeTextColor :: String
  - inactiveTextColor :: String
  - urgentTextColor :: String
  - fontName :: String
  - decoWidth :: Dimension
  - decoHeight :: Dimension
  - windowTitleAddons :: [(String, Align)]
  - windowTitleIcons :: [([[Bool]], Placement)]
  }
- def :: Default a => a
- defaultTheme :: Theme
- data SimpleDecoration a = Simple Bool
- shrinkText :: DefaultShrinker
- data CustomShrink = CustomShrink
- class (Read s, Show s) => Shrinker s where

# Usage:

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

    import XMonad.Layout.SimpleDecoration

Then edit your `layoutHook` by adding the SimpleDecoration decoration to your layout:

    myL = simpleDeco shrinkText def (layoutHook def)
    main = xmonad def { layoutHook = myL }

For more detailed instructions on editing the layoutHook see:

XMonad.Doc.Extending

You can also edit the default configuration options.

    mySDConfig = def { inactiveBorderColor = "red"
                     , inactiveTextColor   = "red"}

and

    myL = dwmStyle shrinkText mySDConfig (layoutHook def)

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

Add simple decorations to windows of a layout.

data Theme #

A `Theme` is a record of colors, font etc., to customize a `DecorationStyle`.

For a collection of `Theme`s see XMonad.Util.Themes

Constructors

Theme |
Fields activeColor :: String Color of the active window inactiveColor :: String Color of the inactive window urgentColor :: String Color of the urgent window activeBorderColor :: String Color of the border of the active window inactiveBorderColor :: String Color of the border of the inactive window urgentBorderColor :: String Color of the border of the urgent window activeTextColor :: String Color of the text of the active window inactiveTextColor :: String Color of the text of the inactive window urgentTextColor :: String Color of the text of the urgent window fontName :: String Font name decoWidth :: Dimension Maximum width of the decorations (if supported by the `DecorationStyle`) decoHeight :: Dimension Height of the decorations windowTitleAddons :: [(String, Align)] Extra text to appear in a window's title bar. Refer to for a use XMonad.Layout.ImageButtonDecoration windowTitleIcons :: [([[Bool]], Placement)] Extra icons to appear in a window's title bar. Inner `[Bool]` is a row in a icon bitmap.

Instances

Read Theme # |
Methods readsPrec :: Int -> ReadS Theme # readList :: ReadS [Theme] # readPrec :: ReadPrec Theme # readListPrec :: ReadPrec [Theme] #
Show Theme # |
Methods showsPrec :: Int -> Theme -> ShowS # show :: Theme -> String # showList :: [Theme] -> ShowS #
Default Theme # |
Methods def :: Theme #

def :: Default a => a #

The default value for this type.

defaultTheme :: Theme #

Deprecated: Use def (from Data.Default, and re-exported by XMonad.Layout.Decoration) instead.

The default xmonad `Theme`.

data SimpleDecoration a #

Constructors

Simple Bool |

Instances

Eq a => DecorationStyle SimpleDecoration a # |
Methods describeDeco :: SimpleDecoration a -> String # shrink :: SimpleDecoration a -> Rectangle -> Rectangle -> Rectangle # decorationEventHook :: SimpleDecoration a -> DecorationState -> Event -> X () # decorationCatchClicksHook :: SimpleDecoration a -> Window -> Int -> Int -> X Bool # decorationWhileDraggingHook :: SimpleDecoration a -> CInt -> CInt -> (Window, Rectangle) -> Position -> Position -> X () # decorationAfterDraggingHook :: SimpleDecoration a -> (Window, Rectangle) -> Window -> X () # pureDecoration :: SimpleDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> Maybe Rectangle # decorate :: SimpleDecoration a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> X (Maybe Rectangle) #
Read (SimpleDecoration a) # |
Methods readsPrec :: Int -> ReadS (SimpleDecoration a) # readList :: ReadS [SimpleDecoration a] # readPrec :: ReadPrec (SimpleDecoration a) # readListPrec :: ReadPrec [SimpleDecoration a] #
Show (SimpleDecoration a) # |
Methods showsPrec :: Int -> SimpleDecoration a -> ShowS # show :: SimpleDecoration a -> String # showList :: [SimpleDecoration a] -> ShowS #

shrinkText :: DefaultShrinker #

data CustomShrink #

Constructors

CustomShrink |

Instances

Read CustomShrink # |
Methods readsPrec :: Int -> ReadS CustomShrink # readList :: ReadS [CustomShrink] # readPrec :: ReadPrec CustomShrink # readListPrec :: ReadPrec [CustomShrink] #
Show CustomShrink # |
Methods showsPrec :: Int -> CustomShrink -> ShowS # show :: CustomShrink -> String # showList :: [CustomShrink] -> ShowS #

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

Minimal complete definition

shrinkIt

Methods

shrinkIt :: s -> String -> [String] #

Instances

Shrinker DefaultShrinker # |
Methods shrinkIt :: DefaultShrinker -> String -> [String] #