diff options
author | Don Stewart <dons@galois.com> | 2007-11-05 03:17:05 +0100 |
---|---|---|
committer | Don Stewart <dons@galois.com> | 2007-11-05 03:17:05 +0100 |
commit | 9df520c0a301046d467ab8d273e1413c018e3c82 (patch) | |
tree | 7ac045604e4928c4805a9009a926b1c03b9cf068 /Main.hs | |
parent | bd8bdda8f6c64c2689e85e8d0e2437d2aab9541a (diff) | |
download | xmonad-9df520c0a301046d467ab8d273e1413c018e3c82.tar.gz xmonad-9df520c0a301046d467ab8d273e1413c018e3c82.tar.xz xmonad-9df520c0a301046d467ab8d273e1413c018e3c82.zip |
EventLoop -> Core, DefaultConfig -> Config
darcs-hash:20071105021705-cba2c-fc7ffc11ffa9a5397cc40a5dba530ca620018f25.gz
Diffstat (limited to '')
-rw-r--r-- | Main.hs | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -14,8 +14,8 @@ module Main (main) where -import XMonad.EventLoop (makeMain) -import XMonad.DefaultConfig (defaultConfig) +import XMonad.Core +import XMonad.Config import Control.Exception (handle) import System.IO @@ -25,6 +25,14 @@ import System.Environment import System.Exit import System.Posix.Process (executeFile) +-- | The entry point into xmonad. Attempts to compile any custom main +-- for xmonad, and if it doesn't find one, just launches the default. +main :: IO () +main = do + handle (hPrint stderr) buildLaunch + -- if buildLaunch returns, execute the trusted core + makeMain defaultConfig + -- | Build "~/.xmonad/Main.hs" with ghc, then execute it. If there are no -- errors, this function does not return. An exception is raised in any of -- these cases: @@ -43,9 +51,3 @@ buildLaunch = do args <- getArgs executeFile (dir ++ "/Main") False args Nothing return () - -main :: IO () -main = do - handle (hPrint stderr) buildLaunch - -- if buildLaunch returns, execute the trusted core - makeMain defaultConfig |