diff options
author | gwern0 <gwern0@gmail.com> | 2007-10-24 02:39:11 +0200 |
---|---|---|
committer | gwern0 <gwern0@gmail.com> | 2007-10-24 02:39:11 +0200 |
commit | ee764d929051f70a1c3eabafc345f4e5d205cbed (patch) | |
tree | 113d9d4db4b480a0ce6b652386dc1d96e9d0185b | |
parent | 3b26780e99d2c2625834cb5b9fc33eff54b112f3 (diff) | |
download | XMonadContrib-ee764d929051f70a1c3eabafc345f4e5d205cbed.tar.gz XMonadContrib-ee764d929051f70a1c3eabafc345f4e5d205cbed.tar.xz XMonadContrib-ee764d929051f70a1c3eabafc345f4e5d205cbed.zip |
Run.hs: do my usual segregation into safe and unsafe runInTerms
darcs-hash:20071024003911-f7719-210cd66ba2f61d9a9f608c423455150e0bcbd9bd.gz
-rw-r--r-- | Run.hs | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -23,6 +23,7 @@ module XMonadContrib.Run ( safeSpawn, unsafeSpawn, runInTerm, + safeRunInTerm, runInXTerm, seconds ) where @@ -106,8 +107,12 @@ unsafeSpawn :: String -> X () unsafeSpawn = spawn -- | Run a given program in a given X terminal emulator. This uses safeSpawn. -runInTerm :: String -> String -> X () -runInTerm term command = safeSpawn term ("-e " ++ command) +safeRunInTerm :: String -> String -> X () +safeRunInTerm term command = safeSpawn term ("-e " ++ command) + +unsafeRunInTerm, runInTerm :: String -> String -> X () +unsafeRunInTerm term command = unsafeSpawn $ term ++ " -e " ++ command +runInTerm = unsafeRunInTerm -- | Runs a given program in XTerm, the X terminal emulator included by default in X.org installations. -- Specializes runInTerm to use XTerm instead of an arbitrary other terminal emulator. |