summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Main.hs4
-rw-r--r--XMonad/Config.hs2
2 files changed, 4 insertions, 2 deletions
diff --git a/Main.hs b/Main.hs
index d99b381..a6872eb 100644
--- a/Main.hs
+++ b/Main.hs
@@ -16,10 +16,12 @@ module Main (main) where
import XMonad
+import Control.Monad (unless)
import System.IO
import System.Info
import System.Environment
import System.Posix.Process (executeFile)
+import System.Exit (exitFailure)
import Paths_xmonad (version)
import Data.Version (showVersion)
@@ -39,7 +41,7 @@ main = do
[] -> launch
["--resume", _] -> launch
["--help"] -> usage
- ["--recompile"] -> recompile True >> return ()
+ ["--recompile"] -> recompile True >>= flip unless exitFailure
["--restart"] -> sendRestart >> return ()
["--version"] -> putStrLn ("xmonad " ++ showVersion version)
#ifdef TESTING
diff --git a/XMonad/Config.hs b/XMonad/Config.hs
index c05c1b1..28bb493 100644
--- a/XMonad/Config.hs
+++ b/XMonad/Config.hs
@@ -218,7 +218,7 @@ keys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
-- quit, or restart
, ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess)) -- %! Quit xmonad
- , ((modMask , xK_q ), spawn "xmonad --recompile; xmonad --restart") -- %! Restart xmonad
+ , ((modMask , xK_q ), spawn "xmonad --recompile && xmonad --restart") -- %! Restart xmonad
]
++
-- mod-[1..9] %! Switch to workspace N