add clearUrgents for your keys

This commit is contained in:
Devin Mullins 2008-09-09 05:54:25 +00:00
parent 27efc7a626
commit c3d5c09e84

View File

@ -54,12 +54,12 @@ module XMonad.Hooks.UrgencyHook (
withUrgencyHook, withUrgencyHookC, withUrgencyHook, withUrgencyHookC,
UrgencyConfig(..), urgencyConfig, UrgencyConfig(..), urgencyConfig,
SuppressWhen(..), RemindWhen(..), SuppressWhen(..), RemindWhen(..),
minutes, focusUrgent, clearUrgents,
focusUrgent,
dzenUrgencyHook, dzenUrgencyHook,
DzenUrgencyHook(..), seconds, DzenUrgencyHook(..),
NoUrgencyHook(..), NoUrgencyHook(..),
FocusHook(..), FocusHook(..),
minutes, seconds,
-- * Stuff for developers: -- * Stuff for developers:
readUrgents, withUrgents, readUrgents, withUrgents,
StdoutUrgencyHook(..), StdoutUrgencyHook(..),
@ -256,6 +256,13 @@ urgencyConfig = UrgencyConfig { suppressWhen = Visible, remindWhen = Dont }
focusUrgent :: X () focusUrgent :: X ()
focusUrgent = withUrgents $ flip whenJust (windows . W.focusWindow) . listToMaybe 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 -- | Stores the global set of all urgent windows, across workspaces. Not exported -- use
-- 'readUrgents' or 'withUrgents' instead. -- 'readUrgents' or 'withUrgents' instead.
{-# NOINLINE urgents #-} {-# NOINLINE urgents #-}