mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-06 06:51:55 -07:00
change example to dzenUrgencyHook
This commit is contained in:
@@ -45,21 +45,14 @@ import Graphics.X11.Xlib.Extras
|
|||||||
-- messages sent to it. Next, add your actual urgencyHook to Config. This
|
-- 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:
|
-- needs to take a Window and return an X () action. Here's an example:
|
||||||
--
|
--
|
||||||
-- > import Dzen (dzen)
|
-- > import XMonadContrib.Dzen
|
||||||
-- > import NamedWindows (getName)
|
|
||||||
-- ...
|
-- ...
|
||||||
-- > urgencyHook :: Window -> X ()
|
-- > urgencyHook :: Window -> X ()
|
||||||
-- > urgencyHook w = do
|
-- > urgencyHook = dzenUrgencyHook (5 `seconds`)
|
||||||
-- > 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)
|
|
||||||
--
|
--
|
||||||
-- This example stands on the shoulders of the NamedWindows and Dzen modules,
|
-- If you're comfortable with programming in the X monad, then you can build
|
||||||
-- but you can build whatever urgencyHook you like. Finally, in order to make
|
-- whatever urgencyHook you like. Finally, in order to make this compile,
|
||||||
-- this compile, open up your Config.hs-boot file and add the following to it:
|
-- open up your Config.hs-boot file and add the following to it:
|
||||||
--
|
--
|
||||||
-- > urgencyHook :: Window -> X ()
|
-- > urgencyHook :: Window -> X ()
|
||||||
--
|
--
|
||||||
|
Reference in New Issue
Block a user