[xmonad] why dose not my urgency hook work?

Devin Mullins me at twifkak.com
Sat May 24 17:24:24 EDT 2008

(Sorry for the dup, Changying; resending to the list for posterity.)

On Sat, May 24, 2008 at 11:57:15PM +0800, Changying Li wrote:
> hi. I want to let something flash when the hidden desktop or window
> demands my attention. so I tried urgency hook. But it didnt work. its my
> configure:

There are three steps to get right:
  1. The X client must set the UrgencyHint flag. How to configure this
  depends on the application. If you're using a terminal app, this is in
  two parts:
     a. The console app must send a ^G (bell).
     b. The terminal must convert the bell into UrgencyHint.
  2. XMonad must be configured to notice UrgencyHints. It looks like you
  have this correct, but you may need to hit mod-shift-space to reset
  the layout.
  3. The dzen must run. Sometimes dzen gets compiled without Xinerama
  support -- run dzen2 -help to see if "-xs" is there.

FWIW, I've lengthened (hopefully improved), the UrgencyHook
documentation in darcs -- see
  http://code.haskell.org/XMonadContrib/XMonad/Hooks/UrgencyHook.hs .

> and when I use dynamicLogDzen directy , the dzen showed nothing, but
> when I use dzenPP it worked.

In DynamicLog.hs, the definition of dynamicLogDzen is:
  dynamicLogDzen = dynamicLogWithPP dzenPP

The default ppOutput in dzenPP is stdout, not the pipe you just spawned.
So, if you prefer, you can mod your xinitrc to pipe the output of xmonad
directly to dzen, or to a named pipe that you pipe to dzen, and then
dynamicLogDzen should work.

BTW, the ($) is not necessary between dynamicLogWithPP and dzenPP -- { }
binds tighter than function application.


More information about the xmonad mailing list