aboutsummaryrefslogtreecommitdiffstats
path: root/Run.hs
diff options
context:
space:
mode:
authorgwern0 <gwern0@gmail.com>2007-10-24 02:18:56 +0200
committergwern0 <gwern0@gmail.com>2007-10-24 02:18:56 +0200
commit3b26780e99d2c2625834cb5b9fc33eff54b112f3 (patch)
treef2816fb27fad670fcaa8bdb013f494c7a0d74ca8 /Run.hs
parent4984acd0120116b4c0d9199041abfc5c213fcdab (diff)
downloadXMonadContrib-3b26780e99d2c2625834cb5b9fc33eff54b112f3.tar.gz
XMonadContrib-3b26780e99d2c2625834cb5b9fc33eff54b112f3.tar.xz
XMonadContrib-3b26780e99d2c2625834cb5b9fc33eff54b112f3.zip
Run.hs: specialize runInXTerm to use runInTerm per my mailing list suggestion
darcs-hash:20071024001856-f7719-144e66b245d780988cea289fc96fcc542b41f461.gz
Diffstat (limited to 'Run.hs')
-rw-r--r--Run.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/Run.hs b/Run.hs
index f7d134b..5afe3ed 100644
--- a/Run.hs
+++ b/Run.hs
@@ -28,7 +28,6 @@ module XMonadContrib.Run (
) where
import Control.Monad.State (Monad((>>), return), when)
-import System.Environment (getEnv)
import System.Posix.Process (createSession, forkProcess, executeFile,
getProcessStatus)
import Control.Concurrent (threadDelay)
@@ -111,8 +110,6 @@ runInTerm :: String -> String -> X ()
runInTerm term command = safeSpawn term ("-e " ++ command)
-- | Runs a given program in XTerm, the X terminal emulator included by default in X.org installations.
--- The use of XTerm can be overridden in one's shell by setting $XTERMCMD to another shell's name.
+-- Specializes runInTerm to use XTerm instead of an arbitrary other terminal emulator.
runInXTerm :: String -> X ()
-runInXTerm com = do
- c <- io $ catch (getEnv "XTERMCMD") (const $ return "xterm")
- spawn ("exec " ++ c ++ " -e " ++ com)
+runInXTerm = runInTerm "xterm"