| 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.DwmStyle
Contents
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)]
- def :: Default a => a
- defaultTheme :: Theme
- data DwmStyle a = Dwm
- 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.DwmStyle
Then edit your layoutHook by adding the DwmStyle decoration to
your layout:
myL = dwmStyle shrinkText def (layoutHook def)
main = xmonad def { layoutHook = myL }For more detailed instructions on editing the layoutHook see:
You can also edit the default configuration options.
myDWConfig = def { inactiveBorderColor = "red"
, inactiveTextColor = "red"}and
myL = dwmStyle shrinkText myDWConfig (layoutHook def)
A complete xmonad.hs file for this would therefore be:
import XMonad
import XMonad.Layout.DwmStyle
main = xmonad def {
layoutHook = dwmStyle shrinkText def (layoutHook def)
}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.
A Theme is a record of colors, font etc., to customize a
DecorationStyle.
For a collection of Themes see XMonad.Util.Themes
Constructors
| Theme | |
Fields
| |
defaultTheme :: Theme #
Deprecated: Use def (from Data.Default, and re-exported by XMonad.Layout.Decoration) instead.
The default xmonad Theme.
Constructors
| Dwm |
Instances
| Eq a => DecorationStyle DwmStyle a # | |
Defined in XMonad.Layout.DwmStyle Methods describeDeco :: DwmStyle a -> String # shrink :: DwmStyle a -> Rectangle -> Rectangle -> Rectangle # decorationEventHook :: DwmStyle a -> DecorationState -> Event -> X () # decorationCatchClicksHook :: DwmStyle a -> Window -> Int -> Int -> X Bool # decorationWhileDraggingHook :: DwmStyle a -> CInt -> CInt -> (Window, Rectangle) -> Position -> Position -> X () # decorationAfterDraggingHook :: DwmStyle a -> (Window, Rectangle) -> Window -> X () # pureDecoration :: DwmStyle a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> Maybe Rectangle # decorate :: DwmStyle a -> Dimension -> Dimension -> Rectangle -> Stack a -> [(a, Rectangle)] -> (a, Rectangle) -> X (Maybe Rectangle) # | |
| Read (DwmStyle a) # | |
| Show (DwmStyle a) # | |
data CustomShrink #
Constructors
| CustomShrink |
Instances
| Read CustomShrink # | |
Defined in XMonad.Layout.Decoration Methods readsPrec :: Int -> ReadS CustomShrink # readList :: ReadS [CustomShrink] # | |
| Show CustomShrink # | |
Defined in XMonad.Layout.Decoration Methods showsPrec :: Int -> CustomShrink -> ShowS # show :: CustomShrink -> String # showList :: [CustomShrink] -> ShowS # | |
| Shrinker CustomShrink # | |
Defined in XMonad.Config.Droundy Methods shrinkIt :: CustomShrink -> String -> [String] # | |
class (Read s, Show s) => Shrinker s where #
Instances
| Shrinker DefaultShrinker # | |
Defined in XMonad.Layout.Decoration Methods shrinkIt :: DefaultShrinker -> String -> [String] # | |
| Shrinker CustomShrink # | |
Defined in XMonad.Config.Droundy Methods shrinkIt :: CustomShrink -> String -> [String] # | |