From 6769de07f7e06ddf6eea728bd7072ebfe6eff017 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Tue, 28 May 2013 03:39:09 +0200 Subject: use Data.Default wherever possible, and deprecate the things it replaces Ignore-this: 898458b1d2868a70dfb09faf473dc7aa darcs-hash:20130528013909-76d51-863278165b6f149c47b08b31b34e85ddcab19f1f.gz --- XMonad/Layout/Decoration.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'XMonad/Layout/Decoration.hs') diff --git a/XMonad/Layout/Decoration.hs b/XMonad/Layout/Decoration.hs index ec09575..3cada5b 100644 --- a/XMonad/Layout/Decoration.hs +++ b/XMonad/Layout/Decoration.hs @@ -17,7 +17,7 @@ module XMonad.Layout.Decoration ( -- * Usage: -- $usage decoration - , Theme (..), defaultTheme + , Theme (..), defaultTheme, def , Decoration , DecorationMsg (..) , DecorationStyle (..) @@ -86,9 +86,8 @@ data Theme = -- Inner @[Bool]@ is a row in a icon bitmap. } deriving (Show, Read) --- | The default xmonad 'Theme'. -defaultTheme :: Theme -defaultTheme = +instance Default Theme where + def = Theme { activeColor = "#999999" , inactiveColor = "#666666" , urgentColor = "#FFFF00" @@ -105,6 +104,11 @@ defaultTheme = , windowTitleIcons = [] } +{-# DEPRECATED defaultTheme "Use def (from Data.Default, and re-exported by XMonad.Layout.Decoration) instead." #-} +-- | The default xmonad 'Theme'. +defaultTheme :: Theme +defaultTheme = def + -- | A 'Decoration' layout modifier will handle 'SetTheme', a message -- to dynamically change the decoration 'Theme'. data DecorationMsg = SetTheme Theme deriving ( Typeable ) -- cgit v1.2.3