From d3426a6b42d8ddb0eba568813c8d19815df2eb8a Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Wed, 30 Jan 2008 07:46:24 +0100 Subject: Various decorations related updates * remove deprecated TConf stuff * Remove 'style' from DeConf * Change DeConf to Theme * share defaultTheme across all decorations darcs-hash:20080130064624-a5988-98fcf49dde956e318f801e934f2045cf94c951d5.gz --- XMonad/Layout/SimpleDecoration.hs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'XMonad/Layout/SimpleDecoration.hs') diff --git a/XMonad/Layout/SimpleDecoration.hs b/XMonad/Layout/SimpleDecoration.hs index d47d9be..fbff81e 100644 --- a/XMonad/Layout/SimpleDecoration.hs +++ b/XMonad/Layout/SimpleDecoration.hs @@ -17,8 +17,8 @@ module XMonad.Layout.SimpleDecoration ( -- * Usage: -- $usage simpleDeco - , DeConfig (..) - , SimpleDecoration (..), defaultSimpleConfig + , Theme (..) + , SimpleDecoration (..) , shrinkText, CustomShrink(CustomShrink) , Shrinker(..) ) where @@ -35,7 +35,7 @@ import XMonad.Layout.Decoration -- Then edit your @layoutHook@ by adding the SimpleDecoration decoration to -- your layout: -- --- > myL = simpleDeco shrinkText defaultSimpleConfig (layoutHook defaultConfig) +-- > myL = simpleDeco shrinkText defaultTheme (layoutHook defaultConfig) -- > main = xmonad defaultConfig { layoutHook = myL } -- -- For more detailed instructions on editing the layoutHook see: @@ -44,20 +44,17 @@ import XMonad.Layout.Decoration -- -- You can also edit the default configuration options. -- --- > mySDConfig = defaultSimpleConfig { inactiveBorderColor = "red" +-- > mySDConfig = defaultTheme { inactiveBorderColor = "red" -- > , inactiveTextColor = "red"} -- -- and -- --- > myL = dwmStyle shrinkText mySDConfig (layoutHook defaultConfig) +-- > myL = dwmStyle shrinkText mySDConfig (layoutHook defaultTheme) -- | Add simple decorations to windows of a layout. -simpleDeco :: Shrinker s => s -> DeConfig SimpleDecoration a +simpleDeco :: Shrinker s => s -> Theme -> l a -> ModifiedLayout (Decoration SimpleDecoration s) l a -simpleDeco s c = decoration s c - -defaultSimpleConfig :: DeConfig SimpleDecoration a -defaultSimpleConfig = mkDefaultDeConfig $ Simple True +simpleDeco s c = decoration s c $ Simple True data SimpleDecoration a = Simple Bool deriving (Show, Read) @@ -67,4 +64,4 @@ instance DecorationStyle SimpleDecoration a where if b then Rectangle x (y + fi dh) w (h - dh) else r pureDecoration (Simple b) wh ht _ _ _ (_,Rectangle x y wid _) = if b then Just $ Rectangle x y nwh ht else Just $ Rectangle x (y - fi ht) nwh ht - where nwh = min wid wh \ No newline at end of file + where nwh = min wid wh -- cgit v1.2.3