aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Util
diff options
context:
space:
mode:
authorLukas Mai <l.mai@web.de>2007-11-06 15:18:29 +0100
committerLukas Mai <l.mai@web.de>2007-11-06 15:18:29 +0100
commit2c20a30fcdf9ec8a6d329b04a20662558be52081 (patch)
tree20af79d4247109be5c13de058b142440aae7c633 /XMonad/Util
parentd65b61905a6fca67c5b1bc045acd0d791f4e58d0 (diff)
downloadXMonadContrib-2c20a30fcdf9ec8a6d329b04a20662558be52081.tar.gz
XMonadContrib-2c20a30fcdf9ec8a6d329b04a20662558be52081.tar.xz
XMonadContrib-2c20a30fcdf9ec8a6d329b04a20662558be52081.zip
make Setup haddock work again
darcs-hash:20071106141829-462cf-c1daa2d74d17a314c7b1f68f9952e8502e44628f.gz
Diffstat (limited to 'XMonad/Util')
-rw-r--r--XMonad/Util/Dzen.hs4
-rw-r--r--XMonad/Util/Run.hs4
-rw-r--r--XMonad/Util/XSelection.hs5
3 files changed, 10 insertions, 3 deletions
diff --git a/XMonad/Util/Dzen.hs b/XMonad/Util/Dzen.hs
index 02fce05..fa7c54c 100644
--- a/XMonad/Util/Dzen.hs
+++ b/XMonad/Util/Dzen.hs
@@ -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
diff --git a/XMonad/Util/Run.hs b/XMonad/Util/Run.hs
index 39a653a..25757d5 100644
--- a/XMonad/Util/Run.hs
+++ b/XMonad/Util/Run.hs
@@ -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" "")
diff --git a/XMonad/Util/XSelection.hs b/XMonad/Util/XSelection.hs
index 00d6723..e701128 100644
--- a/XMonad/Util/XSelection.hs
+++ b/XMonad/Util/XSelection.hs
@@ -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)