mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-05 22:51:54 -07:00
Fix forking issues, add unix dependency.
This commit is contained in:
1
README
1
README
@@ -15,6 +15,7 @@ Building:
|
|||||||
|
|
||||||
X11 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11-1.2
|
X11 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11-1.2
|
||||||
mtl http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mtl-1.0
|
mtl http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mtl-1.0
|
||||||
|
unix http://hackage.haskell.org/cgi-bin/hackage-scripts/package/unix-2.0 (included with ghc)
|
||||||
|
|
||||||
X11-extras: darcs get http://darcs.haskell.org/~sjanssen/X11-extras
|
X11-extras: darcs get http://darcs.haskell.org/~sjanssen/X11-extras
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@ import StackSet (StackSet)
|
|||||||
|
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
import System.IO
|
import System.IO
|
||||||
import System.Process (runCommand)
|
import System.Posix.Process (newSession, executeFile)
|
||||||
import Graphics.X11.Xlib
|
import Graphics.X11.Xlib
|
||||||
import Control.Exception
|
import Control.Exception
|
||||||
|
|
||||||
@@ -73,8 +73,7 @@ io = liftIO
|
|||||||
|
|
||||||
-- | spawn. Launch an external application
|
-- | spawn. Launch an external application
|
||||||
spawn :: String -> X ()
|
spawn :: String -> X ()
|
||||||
spawn x = do v <- io $ handle (return . Just) (runCommand x >> return Nothing)
|
spawn x = io $ forkProcess (do newSession; executeFile "/bin/sh" False ["-c", x] Nothing)
|
||||||
whenJust v $ \e -> trace $ "xmonad:spawn: unable to fork "++show x++": "++show e
|
|
||||||
|
|
||||||
-- | Run a side effecting action with the current workspace. Like 'when' but
|
-- | Run a side effecting action with the current workspace. Like 'when' but
|
||||||
whenJust :: Maybe a -> (a -> X ()) -> X ()
|
whenJust :: Maybe a -> (a -> X ()) -> X ()
|
||||||
|
@@ -7,7 +7,7 @@ license: BSD3
|
|||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Spencer Janssen
|
author: Spencer Janssen
|
||||||
maintainer: sjanssen@cse.unl.edu
|
maintainer: sjanssen@cse.unl.edu
|
||||||
build-depends: base==2.0, X11>=1.1, X11-extras==0.0, mtl==1.0
|
build-depends: base==2.0, X11>=1.1, X11-extras==0.0, mtl==1.0, unix>=1.0
|
||||||
|
|
||||||
executable: xmonad
|
executable: xmonad
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
|
Reference in New Issue
Block a user