mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-26 17:51:51 -07:00
add-willhook-function
Adds a function that hooks into whether the hook will be triggered on the next request.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user