aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Hooks
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Hooks')
-rw-r--r--XMonad/Hooks/ToggleHook.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/XMonad/Hooks/ToggleHook.hs b/XMonad/Hooks/ToggleHook.hs
index a61a73f..aec71f3 100644
--- a/XMonad/Hooks/ToggleHook.hs
+++ b/XMonad/Hooks/ToggleHook.hs
@@ -26,6 +26,7 @@ module XMonad.Hooks.ToggleHook ( -- * Usage
, toggleHookAllNew
-- * Queries
+ , willHook
, willHookNext
, willHookAllNew
@@ -127,6 +128,10 @@ hookAllNew n = _set n second
toggleHookAllNew :: String -> X ()
toggleHookAllNew n = _toggle n second
+-- | Query what will happen at the next ManageHook call for the hook @name@.
+willHook :: String -> X Bool
+willHook n = willHookNext n <||> willHookAllNew n
+
-- | Whether the next window will trigger the hook @name@.
willHookNext :: String -> X Bool
willHookNext n = _get n fst