diff options
author | Devin Mullins <me@twifkak.com> | 2007-11-11 01:00:46 +0100 |
---|---|---|
committer | Devin Mullins <me@twifkak.com> | 2007-11-11 01:00:46 +0100 |
commit | 76eff84c6a60f7d92a588121d30d140f1191d375 (patch) | |
tree | 93747f935476da0633420e733ac8424508eadf9e /XMonad | |
parent | 71db1f2ee20d384d4d9f0ce4f8acb79a86ff88c8 (diff) | |
download | XMonadContrib-76eff84c6a60f7d92a588121d30d140f1191d375.tar.gz XMonadContrib-76eff84c6a60f7d92a588121d30d140f1191d375.tar.xz XMonadContrib-76eff84c6a60f7d92a588121d30d140f1191d375.zip |
fix doco for UrgencyHook
darcs-hash:20071111000046-78224-eff903bd0323eaf7e66b73f4a21ffe5d8138f6aa.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Hooks/UrgencyHook.hs | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/XMonad/Hooks/UrgencyHook.hs b/XMonad/Hooks/UrgencyHook.hs index a3350d3..ea0e314 100644 --- a/XMonad/Hooks/UrgencyHook.hs +++ b/XMonad/Hooks/UrgencyHook.hs @@ -48,36 +48,28 @@ import Graphics.X11.Xlib.Extras import Foreign (unsafePerformIO) -- $usage --- To wire this up, add: +-- To wire this up, first add: -- -- > import XMonad.Hooks.UrgencyHook -- --- to your import list in Config. Change your defaultLayout such that --- withUrgencyHook is applied along the chain. Mine, for example: +-- to your import list in your config file. Now, choose an urgency hook. If +-- you're just interested in displaying the urgency state in your custom +-- logHook, then choose NoUrgencyHook. Otherwise, you may use the provided +-- dzenUrgencyHook, or write your own. -- --- > layoutHook = Layout $ withUrgencyHook $ windowNavigation $ --- > Select layouts +-- Wire your urgency hook into the layoutHook by use of the withUrgencyHook +-- function. My setup, for example: +-- +-- > layoutHook' = Layout $ withUrgencyHook dzenUrgencyHook { args = ["-bg", "darkgreen", "-xs", "1"] } +-- > $ configurableNavigation noNavigateBorders +-- > $ layouts -- -- It shouldn't hurt to have the "withUrgencyHook $" at the outermost layer, -- as above, as UrgencyHook is a LayoutModifier, and hence passes on any --- 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 XMonad.Util.Dzen --- ... --- > urgencyHook :: Window -> X () --- > urgencyHook = dzenUrgencyHook (5 `seconds`) --- --- 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 () --- --- Compile! +-- messages sent to it. -- --- You can also modify your logHook to print out information about urgent windows. --- The functions readUrgents and withUrgents are there to help you with that. +-- If you want to modify your logHook to print out information about urgent windows, +-- the functions readUrgents and withUrgents are there to help you with that. -- No example for you. -- | Focuses the most recently urgent window. Good for what ails ya -- I mean, your keybindings. |