From ebe7b8f40b9147bcaa2b5aedb293633247a5c7a6 Mon Sep 17 00:00:00 2001 From: Roman Cheplyaka Date: Mon, 9 Feb 2009 00:14:22 +0100 Subject: X.U.WindowProperties: docs (description and sections) darcs-hash:20090208231422-3ebed-5015f93cadf2505eaccce4e8921e3af60e9fac22.gz --- XMonad/Util/WindowProperties.hs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'XMonad/Util/WindowProperties.hs') diff --git a/XMonad/Util/WindowProperties.hs b/XMonad/Util/WindowProperties.hs index c09efd1..509d430 100644 --- a/XMonad/Util/WindowProperties.hs +++ b/XMonad/Util/WindowProperties.hs @@ -8,23 +8,26 @@ -- Stability : unstable -- Portability : unportable -- --- EDSL for specifying window properties, such as title, classname or resource. +-- EDSL for specifying window properties; various utilities related to window +-- properties. -- ----------------------------------------------------------------------------- module XMonad.Util.WindowProperties ( - -- * Usage - -- $usage + -- * EDSL for window properties + -- $edsl Property(..), hasProperty, focusedHasProperty, allWithProperty, - getProp32, getProp32s, - propertyToQuery) + propertyToQuery, + -- * Helper functions + -- $helpers + getProp32, getProp32s) where import XMonad import qualified XMonad.StackSet as W import Foreign.C.Types (CLong) import Control.Monad --- $usage --- This module allows to specify window properties, such as title, classname or +-- $edsl +-- Allows to specify window properties, such as title, classname or -- resource, and to check them. -- -- In contrast to ManageHook properties, these are instances of Show and Read, @@ -81,6 +84,8 @@ propertyToQuery (Or p1 p2) = propertyToQuery p1 <||> propertyToQuery p2 propertyToQuery (Not p) = not `fmap` propertyToQuery p propertyToQuery (Const b) = return b +-- $helpers + -- | Get a window property from atom getProp32 :: Atom -> Window -> X (Maybe [CLong]) getProp32 a w = withDisplay $ \dpy -> io $ getWindowProperty32 dpy a w -- cgit v1.2.3