From 3b26780e99d2c2625834cb5b9fc33eff54b112f3 Mon Sep 17 00:00:00 2001 From: gwern0 Date: Wed, 24 Oct 2007 02:18:56 +0200 Subject: Run.hs: specialize runInXTerm to use runInTerm per my mailing list suggestion darcs-hash:20071024001856-f7719-144e66b245d780988cea289fc96fcc542b41f461.gz --- Run.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Run.hs') 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" -- cgit v1.2.3