diff options
Diffstat (limited to '')
-rw-r--r-- | XMonad/Util/Run.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/XMonad/Util/Run.hs b/XMonad/Util/Run.hs index 700ee3c..f0be837 100644 --- a/XMonad/Util/Run.hs +++ b/XMonad/Util/Run.hs @@ -21,6 +21,7 @@ module XMonad.Util.Run ( runProcessWithInput, runProcessWithInputAndWait, safeSpawn, + safeSpawnProg, unsafeSpawn, runInTerm, safeRunInTerm, @@ -109,6 +110,12 @@ Firefox doesn't need any arguments if it is just being started. -} safeSpawn :: MonadIO m => FilePath -> String -> m () safeSpawn prog arg = liftIO (try (forkProcess $ executeFile prog True [arg] Nothing) >> return ()) +-- | Like 'safeSpawn', but only takes a program (and no arguments for it). eg. +-- +-- > safeSpawnProg "firefox" +safeSpawnProg :: MonadIO m => FilePath -> m () +safeSpawnProg = flip safeSpawn "" + unsafeSpawn :: MonadIO m => String -> m () unsafeSpawn = spawn |