aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsmael Carnales <icarnales@gmail.com>2009-10-28 20:35:19 +0100
committerIsmael Carnales <icarnales@gmail.com>2009-10-28 20:35:19 +0100
commit490218a8dce6ae0fc4022fc33ba6a72b87b25205 (patch)
tree7d40986eb94715547f4ce3e1a5dfda81b3f6f2a6
parent56f8398f1dffa2e692c112b4725d07fd1fefa73e (diff)
downloadXMonadContrib-490218a8dce6ae0fc4022fc33ba6a72b87b25205.tar.gz
XMonadContrib-490218a8dce6ae0fc4022fc33ba6a72b87b25205.tar.xz
XMonadContrib-490218a8dce6ae0fc4022fc33ba6a72b87b25205.zip
X.H.ManageHelpers: added currentWs that returns the current workspace
Ignore-this: dcd3dac6bd741d26747807691f125637 darcs-hash:20091028193519-6553f-b668fcfb822718a48caea74d21860de505a467c1.gz
-rw-r--r--XMonad/Hooks/ManageHelpers.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/XMonad/Hooks/ManageHelpers.hs b/XMonad/Hooks/ManageHelpers.hs
index f2444a0..0584b85 100644
--- a/XMonad/Hooks/ManageHelpers.hs
+++ b/XMonad/Hooks/ManageHelpers.hs
@@ -28,6 +28,7 @@ module XMonad.Hooks.ManageHelpers (
Side(..),
composeOne,
(-?>), (/=?), (<==?), (</=?), (-->>), (-?>>),
+ currentWs,
isInProperty,
isKDETrayWindow,
isFullscreen,
@@ -118,6 +119,10 @@ p -?>> f = do
Match b m <- p
if b then fmap Just (f m) else return Nothing
+-- | Return the current workspace
+currentWs :: Query WorkspaceId
+currentWs = liftX (withWindowSet $ return . W.currentTag)
+
-- | A predicate to check whether a window is a KDE system tray icon.
isKDETrayWindow :: Query Bool
isKDETrayWindow = ask >>= \w -> liftX $ do