summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2009-03-22 00:37:36 +0100
committerAdam Vogt <vogt.adam@gmail.com>2009-03-22 00:37:36 +0100
commite735810434ac390bf0719958ae873193e04bdc06 (patch)
treebadb8172a73cd26db24b8e12a10e4d9e78aa9198
parentfac71029b800760e229904604040c39b002db6ed (diff)
downloadmetatile-e735810434ac390bf0719958ae873193e04bdc06.tar
metatile-e735810434ac390bf0719958ae873193e04bdc06.zip
Pester the user with one (not two) xmessages on config errors
Ignore-this: f481f7d3ba5fca5c53a0b3a87daa32bb darcs-hash:20090321233736-1499c-6e732e248211c129eba7b664fed681c97ae09020
-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