diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-01 08:04:08 +0100 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-01 08:04:08 +0100 |
commit | 6c29880ea306202d94a316763ecae354607a8077 (patch) | |
tree | 43796c9ac98b254aaf4503babd1d4c5155d955ee | |
parent | 78a0b0fb52515beeb2f3ce09e8b585607f390f7d (diff) | |
download | XMonadContrib-6c29880ea306202d94a316763ecae354607a8077.tar.gz XMonadContrib-6c29880ea306202d94a316763ecae354607a8077.tar.xz XMonadContrib-6c29880ea306202d94a316763ecae354607a8077.zip |
Remove Config import from Run
darcs-hash:20071101070408-a5988-7233c74d43ac56a382a8835f608b3435f2be344f.gz
-rw-r--r-- | Run.hs | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -27,16 +27,16 @@ module XMonadContrib.Run ( seconds ) where -import Control.Monad.State (Monad((>>), return), when) +import Control.Monad.State +import Control.Monad.Reader import System.Posix.Process (createSession, forkProcess, executeFile, - getProcessStatus) + getProcessStatus) import Control.Concurrent (threadDelay) 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) -import {-# SOURCE #-} Config (terminal) +import XMonad -- $usage -- For an example usage of runInTerm see XMonadContrib.SshPrompt @@ -108,8 +108,8 @@ unsafeSpawn = spawn -- | Run a given program in the preferred terminal emulator. This uses safeSpawn. safeRunInTerm :: String -> X () -safeRunInTerm command = safeSpawn terminal ("-e " ++ command) +safeRunInTerm command = asks terminal >>= \t -> safeSpawn t ("-e " ++ command) unsafeRunInTerm, runInTerm :: String -> X () -unsafeRunInTerm command = unsafeSpawn $ terminal ++ " -e " ++ command +unsafeRunInTerm command = asks terminal >>= \t -> unsafeSpawn $ t ++ " -e " ++ command runInTerm = unsafeRunInTerm |