aboutsummaryrefslogtreecommitdiffstats
path: root/Run.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Run.hs')
-rw-r--r--Run.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Run.hs b/Run.hs
index 051750d..98da796 100644
--- a/Run.hs
+++ b/Run.hs
@@ -20,7 +20,8 @@ module XMonadContrib.Run (
-- $usage
runInXTerm,
runProcessWithInput,
- runProcessWithInputAndWait
+ runProcessWithInputAndWait,
+ seconds
) where
import XMonad
@@ -82,3 +83,8 @@ runInXTerm com = do
c <- io $ catch (getEnv "XTERMCMD") (const $ return "xterm")
spawn ("exec " ++ c ++ " -e " ++ com)
+-- | Multiplies by ONE MILLION, for use with runProcessWithInputAndWait.
+-- Use like:
+-- > (5.5 `seconds`)
+seconds :: Rational -> Int
+seconds = fromEnum . (* 1000000)