make Setup haddock work again

This commit is contained in:
Lukas Mai 2007-11-06 14:18:29 +00:00
parent 7b7b1ce800
commit 58072a2edc
4 changed files with 12 additions and 3 deletions

View File

@ -32,9 +32,11 @@ import XMonad
-- > layoutHook = Layout $ toggleLayouts (noBorders Full) $ Select layouts
--
-- and a key binding like
--
-- > , ((modMask .|. controlMask, xK_space), sendMessage ToggleLayout)
--
-- or a key binding like
--
-- > , ((modMask .|. controlMask, xK_space), sendMessage (Toggle "Full"))
data ToggleLayouts lt lf a = ToggleLayouts Bool (lt a) (lf a) deriving (Read,Show)

View File

@ -29,12 +29,14 @@ import XMonad.Util.Run (runProcessWithInputAndWait, seconds)
-- | @dzen str timeout@ pipes @str@ to dzen2 for @timeout@ microseconds.
-- Example usage:
--
-- > dzen "Hi, mom!" (5 `seconds`)
dzen :: String -> Int -> X ()
dzen str timeout = dzenWithArgs str [] timeout
-- | @dzen str args timeout@ pipes @str@ to dzen2 for @timeout@ seconds, passing @args@ to dzen.
-- Example usage:
--
-- > dzenWithArgs "Hi, dons!" ["-ta", "r"] (5 `seconds`)
dzenWithArgs :: String -> [String] -> Int -> X ()
dzenWithArgs str args timeout = io $ runProcessWithInputAndWait "dzen2" args (unchomp str) timeout
@ -52,12 +54,14 @@ dzenScreen sc str timeout = dzenWithArgs str ["-xs", screen] timeout
-- | Flashes when a window requests your attention and you can't see it. For use with
-- XMonadContrib.UrgencyHook. Usage:
--
-- > urgencyHook = dzenUrgencyHook (5 `seconds`)
dzenUrgencyHook :: Int -> Window -> X ()
dzenUrgencyHook = dzenUrgencyHookWithArgs []
-- | Flashes when a window requests your attention and you can't see it. For use with
-- XMonadContrib.UrgencyHook. Usage:
--
-- > urgencyHook = dzenUrgencyHookWithArgs ["-bg", "darkgreen"] (5 `seconds`)
dzenUrgencyHookWithArgs :: [String] -> Int -> Window -> X ()
dzenUrgencyHookWithArgs args duration w = do

View File

@ -10,7 +10,7 @@
--
-- This modules provides several commands to run an external process.
-- It is composed of functions formerly defined in XMonad.Util.Dmenu (by
-- Spenver Jannsen), XMonad.Util.Dzen (by glasser@mit.edu) and
-- Spenver Jannsen), XMonad.Util.Dzen (by glasser\@mit.edu) and
-- XMonad.Util.RunInXTerm (by Andrea Rossato).
--
-----------------------------------------------------------------------------
@ -81,6 +81,7 @@ runProcessWithInputAndWait cmd args input timeout = do
{- | Multiplies by ONE MILLION, for use with runProcessWithInputAndWait.
Use like:
> (5.5 `seconds`)
-}
seconds :: Rational -> Int
@ -93,6 +94,7 @@ seconds = fromEnum . (* 1000000)
as to bypass the shell and be certain the program will receive the string as you typed it.
unsafeSpawn is an alias for XMonad's 'spawn', to remind one that use of it can be, well, unsafe.
Examples:
> , ((modMask, xK_Print ), unsafeSpawn "import -window root png:$HOME/xwd-$(date +%s)$$.png")
> , ((modMask, xK_d ), safeSpawn "firefox" "")

View File

@ -23,7 +23,7 @@ module XMonad.Util.XSelection (
safePromptSelection,
putSelection) where
import Graphics.X11.Xlib.Extras (Graphics.X11.Xlib.Extras.Event(ev_event_display,
import Graphics.X11.Xlib.Extras (Event(ev_event_display,
ev_time, ev_property, ev_target, ev_selection,
ev_requestor, ev_event_type),
xConvertSelection, xGetSelectionOwner, xSetSelectionOwner, getEvent,
@ -37,7 +37,8 @@ import Control.Exception as E (catch)
import Control.Monad(Monad (return, (>>)), Functor(..), liftM, join)
import Data.Char (chr, ord)
import Data.Maybe (fromMaybe)
import Foreign(Word8, Data.Bits.Bits (shiftL, (.&.), (.|.)))
import Foreign (Word8)
import Data.Bits (shiftL, (.&.), (.|.))
import XMonad.Util.Run (safeSpawn, unsafeSpawn)
import XMonad (X, io)