mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -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:
parent
f4dd8973b1
commit
4377e75bcc
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user