diff options
author | Ben Boeckel <mathstuf@gmail.com> | 2011-05-15 21:17:18 +0200 |
---|---|---|
committer | Ben Boeckel <mathstuf@gmail.com> | 2011-05-15 21:17:18 +0200 |
commit | 2f7793303bf96800eff96df3531fbb6eb261a9e2 (patch) | |
tree | 28fa9425177ed22bfa198c2c642ac14bc28766bf /XMonad/Hooks | |
parent | 531ff7781bdb62fc87841a9723c941b93b24800a (diff) | |
download | XMonadContrib-2f7793303bf96800eff96df3531fbb6eb261a9e2.tar.gz XMonadContrib-2f7793303bf96800eff96df3531fbb6eb261a9e2.tar.xz XMonadContrib-2f7793303bf96800eff96df3531fbb6eb261a9e2.zip |
add-willhook-function
Ignore-this: 9db50eec5b91baa973b4a92c72aeceaf
Adds a function that hooks into whether the hook will be triggered on the next
request.
darcs-hash:20110515191718-24e3f-997c368f871dfcfa594662b9fb889ceb9a327fef.gz
Diffstat (limited to 'XMonad/Hooks')
-rw-r--r-- | XMonad/Hooks/ToggleHook.hs | 5 |
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 |