From 64d5e36232b03d23b6a2315e55fb7a0752ac35a3 Mon Sep 17 00:00:00 2001
From: Adam Vogt <vogt.adam@gmail.com>
Date: Thu, 17 Nov 2011 05:25:22 +0100
Subject: Correct recompile keybinding (issue 126)

Ignore-this: e27d6d60a16788192c0bb0399a597fb3

Thanks reenberg for pointing out the previous patch incorrectly warns about a
missing xmonad when the config has an error.

Also changed is "type" which as a shell builtin is more likely to exist than
"which".

darcs-hash:20111117042522-1499c-f0c882660e4e8ea02c601331e431a97b2585a2d1.gz
---
 XMonad/Config.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/XMonad/Config.hs b/XMonad/Config.hs
index c089910..7e64a75 100644
--- a/XMonad/Config.hs
+++ b/XMonad/Config.hs
@@ -202,7 +202,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 "which xmonad && { xmonad --recompile && xmonad --restart;} || xmessage xmonad not in \\$PATH: \"$PATH\"") -- %! Restart xmonad
+    , ((modMask              , xK_q     ), spawn "if type xmonad; then xmonad --recompile && xmonad --restart; else xmessage xmonad not in \\$PATH: \"$PATH\"; fi") -- %! Restart xmonad
     ]
     ++
     -- mod-[1..9] %! Switch to workspace N
-- 
cgit v1.2.3