aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout/SimpleDecoration.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2008-01-30 07:46:24 +0100
committerSpencer Janssen <sjanssen@cse.unl.edu>2008-01-30 07:46:24 +0100
commitd3426a6b42d8ddb0eba568813c8d19815df2eb8a (patch)
tree807247988d95b065f678b529366ff2fc0a857e6d /XMonad/Layout/SimpleDecoration.hs
parent9e2027cb16109995efc979e6c2785d346e78f8c2 (diff)
downloadXMonadContrib-d3426a6b42d8ddb0eba568813c8d19815df2eb8a.tar.gz
XMonadContrib-d3426a6b42d8ddb0eba568813c8d19815df2eb8a.tar.xz
XMonadContrib-d3426a6b42d8ddb0eba568813c8d19815df2eb8a.zip
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
Diffstat (limited to 'XMonad/Layout/SimpleDecoration.hs')
-rw-r--r--XMonad/Layout/SimpleDecoration.hs19
1 files changed, 8 insertions, 11 deletions
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