xmonad-contrib-0.11.1: Third party extensions for xmonad

Portability | unportable
Stability | unstable
Maintainer | andrea.rossato@unibz.it
Safe Haskell | None

XMonad.Layout.DwmStyle

Contents

- Usage:

Description

A layout modifier for decorating windows in a dwm like style.

Synopsis

- dwmStyle :: (Eq a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration DwmStyle 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)]
  }
- defaultTheme :: Theme
- data DwmStyle a = Dwm
- shrinkText :: DefaultShrinker
- data CustomShrink = CustomShrink
- class (Read s, Show s) => Shrinker s where
  - shrinkIt :: s -> String -> [String]

# Usage:

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

     import XMonad.Layout.DwmStyle

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

     myL = dwmStyle shrinkText defaultTheme (layoutHook defaultConfig)
     main = xmonad defaultConfig { layoutHook = myL }

For more detailed instructions on editing the layoutHook see:

XMonad.Doc.Extending

You can also edit the default configuration options.

     myDWConfig = defaultTheme { inactiveBorderColor = "red"
                               , inactiveTextColor   = "red"}

and

     myL = dwmStyle shrinkText myDWConfig (layoutHook defaultConfig)

A complete xmonad.hs file for this would therefore be:

     import XMonad
     import XMonad.Layout.DwmStyle

     main = xmonad defaultConfig {
                        layoutHook =
                            dwmStyle shrinkText defaultTheme
                                (layoutHook defaultConfig)
                  }

dwmStyle :: (Eq a, Shrinker s) => s -> Theme -> l a -> ModifiedLayout (Decoration DwmStyle s) l a

Add simple old dwm-style 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 |
Show Theme |

defaultTheme :: Theme

The default xmonad `Theme`.

data DwmStyle a

Constructors

Dwm |

Instances

Eq a => DecorationStyle DwmStyle a |
Read (DwmStyle a) |
Show (DwmStyle a) |

shrinkText :: DefaultShrinker

data CustomShrink

Constructors

CustomShrink |

Instances

Read CustomShrink |
Show CustomShrink |
Shrinker CustomShrink |

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

Methods

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

Instances

Shrinker DefaultShrinker |
Shrinker CustomShrink |