aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Config
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2009-09-18 01:39:53 +0200
committerAdam Vogt <vogt.adam@gmail.com>2009-09-18 01:39:53 +0200
commitfa696f56510ee41831c3f025f36aab4d9f113949 (patch)
tree46ec69df7c05c621e464080b58e2e5074ca65f5f /XMonad/Config
parent96ac00bed28fb3e30a8db4d1426a4d2c32a1730f (diff)
downloadXMonadContrib-fa696f56510ee41831c3f025f36aab4d9f113949.tar.gz
XMonadContrib-fa696f56510ee41831c3f025f36aab4d9f113949.tar.xz
XMonadContrib-fa696f56510ee41831c3f025f36aab4d9f113949.zip
Use U.Run.safeSpawn in C.Gnome
Ignore-this: b2476a239089a3fd3fe9001cf48e8f09 darcs-hash:20090917233953-1499c-ed27da33089b4e656eefcb95e39063144850717f.gz
Diffstat (limited to 'XMonad/Config')
-rw-r--r--XMonad/Config/Gnome.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/XMonad/Config/Gnome.hs b/XMonad/Config/Gnome.hs
index 6b1e94f..32fe81f 100644
--- a/XMonad/Config/Gnome.hs
+++ b/XMonad/Config/Gnome.hs
@@ -21,13 +21,11 @@ module XMonad.Config.Gnome (
import XMonad
import XMonad.Config.Desktop
+import XMonad.Util.Run (safeSpawn)
import qualified Data.Map as M
import System.Environment (getEnvironment)
-import System.Cmd (rawSystem)
-
-import Control.Concurrent (forkIO)
-- $usage
-- To use this module, start with the following @~\/.xmonad\/xmonad.hs@:
@@ -70,10 +68,8 @@ gnomeRun = withDisplay $ \dpy -> do
-- > gconftool-2 -s /desktop/gnome/session/required_components/windowmanager xmonad --type string
gnomeRegister :: IO ()
gnomeRegister = do
- let void_ = fmap (const ())
x <- lookup "DESKTOP_AUTOSTART_ID" `fmap` getEnvironment
- whenJust x $ \sessionId -> void_ $ forkIO $ void_ $
- rawSystem "dbus-send"
+ whenJust x $ \sessionId -> safeSpawn "dbus-send"
["--session"
,"--print-reply=string"
,"--dest=org.gnome.SessionManager"