aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgwern0 <gwern0@gmail.com>2007-10-19 20:09:53 +0200
committergwern0 <gwern0@gmail.com>2007-10-19 20:09:53 +0200
commitab7d4a946f053a77c007923c0dec4fd2409c825e (patch)
tree54e645599991ee02c07dd8d8eee5e34f7f688216
parentb1b88b0feda71b8092386963d36da11a8d0472be (diff)
downloadXMonadContrib-ab7d4a946f053a77c007923c0dec4fd2409c825e.tar.gz
XMonadContrib-ab7d4a946f053a77c007923c0dec4fd2409c825e.tar.xz
XMonadContrib-ab7d4a946f053a77c007923c0dec4fd2409c825e.zip
Run.hs: fmt
darcs-hash:20071019180953-f7719-0e7101b3e3a3378d43807d080aae8de74ffb3802.gz
Diffstat (limited to '')
-rw-r--r--Run.hs20
1 files changed, 9 insertions, 11 deletions
diff --git a/Run.hs b/Run.hs
index 7fd9ff7..2eb16d4 100644
--- a/Run.hs
+++ b/Run.hs
@@ -3,7 +3,7 @@
-- Module : XMonadContrib.Run
-- Copyright : (C) 2007 Spencer Janssen, Andrea Rossato, glasser@mit.edu
-- License : BSD-style (see LICENSE)
---
+--
-- Maintainer : Christian Thiemann <mail@christian-thiemann.de>
-- Stability : unstable
-- Portability : unportable
@@ -23,15 +23,15 @@ module XMonadContrib.Run (
seconds
) where
-import XMonad
+import Control.Monad.State (Monad((>>), return), when)
+import System.Posix.Process (createSession, forkProcess, executeFile,
+ getProcessStatus)
import Control.Concurrent (threadDelay)
-import Control.Monad.State
-import System.Environment
-import System.Exit
-import System.IO
-import System.Posix.Process (forkProcess, getProcessStatus, createSession)
-import System.Process
-
+import Control.Exception (try)
+import System.Exit (ExitCode(ExitSuccess), exitWith)
+import System.IO (IO, FilePath, hPutStr, hGetContents, hFlush, hClose)
+import System.Process (runInteractiveProcess, waitForProcess)
+import XMonad (X, io, spawn)
-- $usage
-- For an example usage of runInXTerm see XMonadContrib.SshPrompt
@@ -66,8 +66,6 @@ runProcessWithInputAndWait cmd args input timeout = do
hFlush pin
threadDelay timeout
hClose pin
- -- output <- hGetContents pout
- -- when (output==output) $ return ()
hClose pout
hClose perr
waitForProcess ph