diff options
author | Devin Mullins <me@twifkak.com> | 2007-11-03 06:54:58 +0100 |
---|---|---|
committer | Devin Mullins <me@twifkak.com> | 2007-11-03 06:54:58 +0100 |
commit | 7932b8d34f317567c3fef9a7cc0c987daf5cc40a (patch) | |
tree | 2a7a6d6c57b62d59773a3ba1be6a41d5eb595015 | |
parent | d457dd075acd61e22deefaa17250654b0de77ebc (diff) | |
download | XMonadContrib-7932b8d34f317567c3fef9a7cc0c987daf5cc40a.tar.gz XMonadContrib-7932b8d34f317567c3fef9a7cc0c987daf5cc40a.tar.xz XMonadContrib-7932b8d34f317567c3fef9a7cc0c987daf5cc40a.zip |
add focusUrgent action, for those too lazy to read
darcs-hash:20071103055458-78224-9fb8fee624a5d2bde6747a20980dc88c6b68b2ca.gz
-rw-r--r-- | UrgencyHook.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/UrgencyHook.hs b/UrgencyHook.hs index 63760f8..e22ee75 100644 --- a/UrgencyHook.hs +++ b/UrgencyHook.hs @@ -20,11 +20,14 @@ module XMonadContrib.UrgencyHook ( -- * Usage -- $usage withUrgencyHook, + focusUrgent, readUrgents, withUrgents ) where import {-# SOURCE #-} Config (urgencyHook, logHook) +import Operations (windows) +import qualified StackSet as W import XMonad import XMonadContrib.LayoutModifier @@ -72,6 +75,12 @@ import Foreign (unsafePerformIO) -- The functions readUrgents and withUrgents are there to help you with that. -- No example for you. +-- | Focuses the most recently urgent window. Good for what ails ya -- I mean, your keybindings. +-- Example keybinding: +-- > , ((modMask , xK_BackSpace), focusUrgent) +focusUrgent :: X () +focusUrgent = withUrgents $ flip whenJust (windows . W.focusWindow) . listToMaybe + -- | Stores the global set of all urgent windows, across workspaces. Not exported -- use -- @readUrgents@ or @withUrgents@ instead. {-# NOINLINE urgents #-} |