[xmonad] Actions on window alerts?

Wirt Wolff wirtwolff at gmail.com
Sun Feb 8 22:57:13 EST 2009

Excerpts from joseph.h.garvin's message of Sun Feb 08 19:32:21 -0700 2009:
> alerted (when it blinks in gnome-panel)? I'd like to have a desktop to
> toss instant messaging windows onto to disregard them until the person
> I'm talking to replies (which causes the window to alert if it
> currently doesn't have focus) at which point I'd like it to move to
> whatever desktop I happen to be working on so I'll notice it.

AFAICT, Hooks.UrgencyHooks doesn't provide a "bring the window to me"
function, but perhaps you could define your own instance of UrgencyHook. 

import Data.Maybe
import XMonad.Actions.WindowBringer
import XMonad.Hooks.UrgencyHook

data BringHook = BringHook deriving (Read, Show)
instance UrgencyHook BringHook where
    urgencyHook _ _ = withUrgents $
            flip whenJust (windows . bringWindow) . listToMaybe

then use something like

myConfig = withUrgencyHook BringHook $ defaultConf {...

pretty sure that should work. type checks in ghci anyway.


More information about the xmonad mailing list