aboutsummaryrefslogtreecommitdiffstats
path: root/UrgencyHook.hs
diff options
context:
space:
mode:
authorDevin Mullins <me@twifkak.com>2007-10-18 04:20:26 +0200
committerDevin Mullins <me@twifkak.com>2007-10-18 04:20:26 +0200
commitd07188909ee3a7dc3ce4004c16759be279f6ae2a (patch)
treed55ce110314d0e096b04f454456d730d1c5b78a8 /UrgencyHook.hs
parent6f381eb4fd9f00f229348acda35a09990441c208 (diff)
downloadXMonadContrib-d07188909ee3a7dc3ce4004c16759be279f6ae2a.tar.gz
XMonadContrib-d07188909ee3a7dc3ce4004c16759be279f6ae2a.tar.xz
XMonadContrib-d07188909ee3a7dc3ce4004c16759be279f6ae2a.zip
change example to dzenUrgencyHook
darcs-hash:20071018022026-78224-801dce0f1fb3cf4affa918665ec8195e50a98c1e.gz
Diffstat (limited to 'UrgencyHook.hs')
-rw-r--r--UrgencyHook.hs17
1 files changed, 5 insertions, 12 deletions
diff --git a/UrgencyHook.hs b/UrgencyHook.hs
index 3410163..3c5f3ce 100644
--- a/UrgencyHook.hs
+++ b/UrgencyHook.hs
@@ -45,21 +45,14 @@ import Graphics.X11.Xlib.Extras
-- messages sent to it. Next, add your actual urgencyHook to Config. This
-- needs to take a Window and return an X () action. Here's an example:
--
--- > import Dzen (dzen)
--- > import NamedWindows (getName)
+-- > import XMonadContrib.Dzen
-- ...
-- > urgencyHook :: Window -> X ()
--- > urgencyHook w = do
--- > name <- getName w
--- > ws <- gets windowset
--- > whenJust (W.findIndex w ws) (flash name ws)
--- > where flash name ws index =
--- > when (index /= W.tag (W.workspace (W.current ws))) $
--- > dzen (show name ++ " requests your attention on workspace " ++ show index)
+-- > urgencyHook = dzenUrgencyHook (5 `seconds`)
--
--- This example stands on the shoulders of the NamedWindows and Dzen modules,
--- but you can build whatever urgencyHook you like. Finally, in order to make
--- this compile, open up your Config.hs-boot file and add the following to it:
+-- If you're comfortable with programming in the X monad, then you can build
+-- whatever urgencyHook you like. Finally, in order to make this compile,
+-- open up your Config.hs-boot file and add the following to it:
--
-- > urgencyHook :: Window -> X ()
--