mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
add clearUrgents for your keys
This commit is contained in:
parent
27efc7a626
commit
c3d5c09e84
@ -54,12 +54,12 @@ module XMonad.Hooks.UrgencyHook (
|
||||
withUrgencyHook, withUrgencyHookC,
|
||||
UrgencyConfig(..), urgencyConfig,
|
||||
SuppressWhen(..), RemindWhen(..),
|
||||
minutes,
|
||||
focusUrgent,
|
||||
focusUrgent, clearUrgents,
|
||||
dzenUrgencyHook,
|
||||
DzenUrgencyHook(..), seconds,
|
||||
DzenUrgencyHook(..),
|
||||
NoUrgencyHook(..),
|
||||
FocusHook(..),
|
||||
minutes, seconds,
|
||||
-- * Stuff for developers:
|
||||
readUrgents, withUrgents,
|
||||
StdoutUrgencyHook(..),
|
||||
@ -256,6 +256,13 @@ urgencyConfig = UrgencyConfig { suppressWhen = Visible, remindWhen = Dont }
|
||||
focusUrgent :: X ()
|
||||
focusUrgent = withUrgents $ flip whenJust (windows . W.focusWindow) . listToMaybe
|
||||
|
||||
-- | Just makes the urgents go away.
|
||||
-- Example keybinding:
|
||||
--
|
||||
-- > , ((modMask .|. shiftMask, xK_BackSpace), clearUrgents)
|
||||
clearUrgents :: X ()
|
||||
clearUrgents = adjustUrgents (const []) >> adjustReminders (const [])
|
||||
|
||||
-- | Stores the global set of all urgent windows, across workspaces. Not exported -- use
|
||||
-- 'readUrgents' or 'withUrgents' instead.
|
||||
{-# NOINLINE urgents #-}
|
||||
|
Loading…
x
Reference in New Issue
Block a user