why dose not my urgency hook work?

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: statusBarCmd= "dzen2 -bg '#1a1a1a' -fg '#777777' -h 16 -w 600 -sa c -e '' -fn '-*-courier-*-r-normal-*-*-120-*-*-*-*-iso8859-*' -ta l" main = do din <- spawnPipe statusBarCmd xmonad $ withUrgencyHook dzenUrgencyHook { args = ["-bg", "yellow", "-xs", "1"] } $ defaults { logHook = dynamicLogWithPP $ dzenPP { ppOutput = hPutStrLn din } } and when I use dynamicLogDzen directy , the dzen showed nothing, but when I use dzenPP it worked. btw, I'm using archlinux and xmonad 0.7 -- Thanks & Regards Changying Li

(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. Devin
participants (2)
-
Changying Li
-
Devin Mullins