aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2011-06-09 07:09:22 +0200
committerAdam Vogt <vogt.adam@gmail.com>2011-06-09 07:09:22 +0200
commit45c6b115e6609c905c0578a785a53784820da71d (patch)
tree97e8d013222502588ca1427b789b2145ade3480e
parent412b9db200aaec3c371e2f1928b44388ae9297e6 (diff)
downloadXMonadContrib-45c6b115e6609c905c0578a785a53784820da71d.tar.gz
XMonadContrib-45c6b115e6609c905c0578a785a53784820da71d.tar.xz
XMonadContrib-45c6b115e6609c905c0578a785a53784820da71d.zip
Add more L.LayoutBuilderP documentation
Ignore-this: 1441d917c84b165f30711e572e239392 darcs-hash:20110609050922-1499c-3781238ffd2d6ad1f0ce84601dfdf5f019afd2e6.gz
-rw-r--r--XMonad/Layout/LayoutBuilderP.hs16
1 files changed, 14 insertions, 2 deletions
diff --git a/XMonad/Layout/LayoutBuilderP.hs b/XMonad/Layout/LayoutBuilderP.hs
index 8b03282..6ff48d0 100644
--- a/XMonad/Layout/LayoutBuilderP.hs
+++ b/XMonad/Layout/LayoutBuilderP.hs
@@ -16,9 +16,11 @@
module XMonad.Layout.LayoutBuilderP (
LayoutP (..),
- Predicate (..),
layoutP, layoutAll,
- B.relBox, B.absBox
+ B.relBox, B.absBox,
+ -- * Overloading ways to select windows
+ -- $selectWin
+ Predicate (..),
) where
import Control.Monad
@@ -30,9 +32,19 @@ import XMonad.Util.WindowProperties
import qualified XMonad.Layout.LayoutBuilder as B
+-- $selectWin
+--
+-- 'Predicate' exists because layouts are required to be serializable, and
+-- "XMonad.Util.WindowProperties" is not sufficient (for example it does not
+-- allow using regular expressions).
+--
+-- compare "XMonad.Util.Invisible"
+
-- | Type class for predicates. This enables us to manage not only Windows,
-- but any objects, for which instance Predicate is defined.
-- We assume that for all w checkPredicate (alwaysTrue undefined) == return True.
+--
+-- Another instance exists in XMonad.Util.WindowPropertiesRE in xmonad-extras
class Predicate p w where
alwaysTrue :: w -> p -- ^ A predicate that is always True. First argument is dummy, we always set it to undefined
checkPredicate :: p -> w -> X Bool -- ^ Check if given object (window or smth else) matches that predicate