aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Util
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@unibz.it>2008-01-24 14:46:38 +0100
committerAndrea Rossato <andrea.rossato@unibz.it>2008-01-24 14:46:38 +0100
commite63d7c9d44b598a2bdc9e11aade6cc33c3ef17e3 (patch)
tree486b60eb163aa00de26f50db016156f673a353f5 /XMonad/Util
parent1dc2813cb5e01113c537d94f166eff1933d48e75 (diff)
downloadXMonadContrib-e63d7c9d44b598a2bdc9e11aade6cc33c3ef17e3.tar.gz
XMonadContrib-e63d7c9d44b598a2bdc9e11aade6cc33c3ef17e3.tar.xz
XMonadContrib-e63d7c9d44b598a2bdc9e11aade6cc33c3ef17e3.zip
XUtils: add functions for operating on lists of windows and export fi
darcs-hash:20080124134638-32816-43a3c58521c15bcef08ebe32868f026a2479384b.gz
Diffstat (limited to 'XMonad/Util')
-rw-r--r--XMonad/Util/XUtils.hs41
1 files changed, 28 insertions, 13 deletions
diff --git a/XMonad/Util/XUtils.hs b/XMonad/Util/XUtils.hs
index 7bd0ed7..aff7b4b 100644
--- a/XMonad/Util/XUtils.hs
+++ b/XMonad/Util/XUtils.hs
@@ -12,19 +12,22 @@
--
-----------------------------------------------------------------------------
-module XMonad.Util.XUtils (
- -- * Usage:
- -- $usage
- averagePixels
- , createNewWindow
- , showWindow
- , hideWindow
- , deleteWindow
- , paintWindow
- , paintAndWrite
- , stringToPixel
- ) where
-
+module XMonad.Util.XUtils
+ ( -- * Usage:
+ -- $usage
+ averagePixels
+ , createNewWindow
+ , showWindow
+ , showWindows
+ , hideWindow
+ , hideWindows
+ , deleteWindow
+ , deleteWindows
+ , paintWindow
+ , paintAndWrite
+ , stringToPixel
+ , fi
+ ) where
import Data.Maybe
import XMonad
@@ -65,18 +68,30 @@ showWindow w = do
d <- asks display
io $ mapWindow d w
+-- | the list version
+showWindows :: [Window] -> X ()
+showWindows = mapM_ showWindow
+
-- | unmap a window
hideWindow :: Window -> X ()
hideWindow w = do
d <- asks display
io $ unmapWindow d w
+-- | the list version
+hideWindows :: [Window] -> X ()
+hideWindows = mapM_ hideWindow
+
-- | destroy a window
deleteWindow :: Window -> X ()
deleteWindow w = do
d <- asks display
io $ destroyWindow d w
+-- | the list version
+deleteWindows :: [Window] -> X ()
+deleteWindows = mapM_ deleteWindow
+
-- | Fill a window with a rectangle and a border
paintWindow :: Window -- ^ The window where to draw
-> Dimension -- ^ Window width