mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-14 11:45:54 -07:00
Run.hs, SshPrompt.hs, ShellPrompt.hs: mv runInXTerm back into Run.hs per suggestions
This commit is contained in:
@@ -20,7 +20,6 @@ module XMonadContrib.ShellPrompt (
|
||||
, split
|
||||
, prompt
|
||||
, safePrompt
|
||||
, runInXTerm
|
||||
) where
|
||||
|
||||
import System.Environment (getEnv)
|
||||
@@ -76,12 +75,6 @@ safePrompt c config = mkXPrompt Shell config (getShellCompl [c]) run
|
||||
unsafePrompt c config = mkXPrompt Shell config (getShellCompl [c]) run
|
||||
where run a = unsafeSpawn $ c ++ " " ++ a
|
||||
|
||||
-- This may be better done as a specialization of 'prompt'
|
||||
runInXTerm :: String -> X ()
|
||||
runInXTerm com = do
|
||||
c <- io $ catch (getEnv "XTERMCMD") (const $ return "xterm")
|
||||
spawn ("exec " ++ c ++ " -e " ++ com)
|
||||
|
||||
getShellCompl :: [String] -> String -> IO [String]
|
||||
getShellCompl cmds s | s == "" || last s == ' ' = return []
|
||||
| otherwise = do
|
||||
|
Reference in New Issue
Block a user