xmonad-contrib-0.7: Third party extensions for xmonadContentsIndex
XMonad.Layout.DwmStyle
Portabilityunportable
Stabilityunstable
Maintainerandrea.rossato@unibz.it
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
}
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#Editing_the_layout_hook

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 Themes see XMonad.Util.Themes

Constructors
Theme
activeColor :: StringColor of the active window
inactiveColor :: StringColor of the inactive window
urgentColor :: StringColor of the urgent window
activeBorderColor :: StringColor of the border of the active window
inactiveBorderColor :: StringColor of the border of the inactive window
urgentBorderColor :: StringColor of the border of the urgent window
activeTextColor :: StringColor of the text of the active window
inactiveTextColor :: StringColor of the text of the inactive window
urgentTextColor :: StringColor of the text of the urgent window
fontName :: StringFont name
decoWidth :: DimensionMaximum width of the decorations (if supported by the DecorationStyle)
decoHeight :: DimensionHeight of the decorations
show/hide Instances
defaultTheme :: Theme
The default xmonad Theme.
data DwmStyle a
Constructors
Dwm
show/hide Instances
shrinkText :: DefaultShrinker
data CustomShrink
Constructors
CustomShrink
show/hide Instances
class (Read s, Show s) => Shrinker s where
Methods
shrinkIt :: s -> String -> [String]
show/hide Instances
Produced by Haddock version 0.8