mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
32 lines
899 B
Haskell
32 lines
899 B
Haskell
-----------------------------------------------------------------------------
|
|
-- |
|
|
-- Module : XMonadContrib.RunInXTerm
|
|
-- Copyright : (C) 2007 Andrea Rossato
|
|
-- License : BSD3
|
|
--
|
|
-- Maintainer : andrea.rossato@unibz.it
|
|
-- Stability : unstable
|
|
-- Portability : unportable
|
|
--
|
|
-- A simple module to launch commands in an X terminal
|
|
-- from XMonad
|
|
--
|
|
-----------------------------------------------------------------------------
|
|
|
|
module XMonadContrib.RunInXTerm (
|
|
-- * Usage
|
|
-- $usage
|
|
runInXTerm
|
|
) where
|
|
|
|
import XMonad
|
|
import System.Environment
|
|
|
|
-- $usage
|
|
-- For an example usage see "XMonadContrib.SshPrompt"
|
|
|
|
runInXTerm :: String -> X ()
|
|
runInXTerm com = do
|
|
c <- io $ catch (getEnv "XTERMCMD") (const $ return "xterm")
|
|
spawn ("exec " ++ c ++ " -e " ++ com)
|