diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-09-28 07:31:06 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-09-28 07:31:06 +0200 |
commit | bfa8db9713a99f6086a2af87fe6dd67d2edaacc0 (patch) | |
tree | 947017388b48f306f2d8490fbea4f52a2aefbcd7 | |
parent | 5584ab8440385d2d1b2e611835aee34af92a0a6c (diff) | |
download | XMonadContrib-bfa8db9713a99f6086a2af87fe6dd67d2edaacc0.tar.gz XMonadContrib-bfa8db9713a99f6086a2af87fe6dd67d2edaacc0.tar.xz XMonadContrib-bfa8db9713a99f6086a2af87fe6dd67d2edaacc0.zip |
LayoutModifier should have descriptions too
darcs-hash:20070928053106-a5988-52ef6ad59898865d6d389059e126f210a2f6e4ec.gz
-rw-r--r-- | LayoutModifier.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/LayoutModifier.hs b/LayoutModifier.hs index f2dcd32..b518c43 100644 --- a/LayoutModifier.hs +++ b/LayoutModifier.hs @@ -36,6 +36,8 @@ class (Show (m a), Read (m a)) => LayoutModifier m a where hook _ = return () unhook :: m a -> X () unhook _ = return () + modifierDescription :: m a -> String + modifierDescription = show instance (LayoutModifier m a, Layout l a) => Layout (ModifiedLayout m l) a where doLayout (ModifiedLayout m l) r s = @@ -51,5 +53,6 @@ instance (LayoutModifier m a, Layout l a) => Layout (ModifiedLayout m l) a where return $ case mm' of Just m' -> Just $ (ModifiedLayout m') $ maybe l id ml' Nothing -> (ModifiedLayout m) `fmap` ml' + description (ModifiedLayout m l) = modifierDescription m ++ description l data ModifiedLayout m l a = ModifiedLayout (m a) (l a) deriving ( Read, Show ) |