aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Util/WindowProperties.hs
diff options
context:
space:
mode:
authorRoman Cheplyaka <roma@ro-che.info>2009-02-09 00:14:22 +0100
committerRoman Cheplyaka <roma@ro-che.info>2009-02-09 00:14:22 +0100
commitebe7b8f40b9147bcaa2b5aedb293633247a5c7a6 (patch)
tree827d125af5168181eaa7e1d91e8668a75b883585 /XMonad/Util/WindowProperties.hs
parent6dde16269006a318e1a1ef5a5ff6d089854db6d2 (diff)
downloadXMonadContrib-ebe7b8f40b9147bcaa2b5aedb293633247a5c7a6.tar.gz
XMonadContrib-ebe7b8f40b9147bcaa2b5aedb293633247a5c7a6.tar.xz
XMonadContrib-ebe7b8f40b9147bcaa2b5aedb293633247a5c7a6.zip
X.U.WindowProperties: docs (description and sections)
darcs-hash:20090208231422-3ebed-5015f93cadf2505eaccce4e8921e3af60e9fac22.gz
Diffstat (limited to 'XMonad/Util/WindowProperties.hs')
-rw-r--r--XMonad/Util/WindowProperties.hs19
1 files changed, 12 insertions, 7 deletions
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