mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
Pester the user with one (not two) xmessages on config errors
This commit is contained in:
parent
d9d3e40112
commit
66e7715ea6
4
Main.hs
4
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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user