From 45c6b115e6609c905c0578a785a53784820da71d Mon Sep 17 00:00:00 2001 From: Adam Vogt Date: Thu, 9 Jun 2011 07:09:22 +0200 Subject: Add more L.LayoutBuilderP documentation Ignore-this: 1441d917c84b165f30711e572e239392 darcs-hash:20110609050922-1499c-3781238ffd2d6ad1f0ce84601dfdf5f019afd2e6.gz --- XMonad/Layout/LayoutBuilderP.hs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'XMonad/Layout/LayoutBuilderP.hs') 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 -- cgit v1.2.3