----------------------------------------------------------------------
-- Now run xmonad with all the defaults we set up.

-- Run xmonad with the settings you specify. No need to modify this.
--
main = do
    homeDir <- getHomeDirectory
    statusproc <- spawnPipe $ statusBarProc (homeDir ++ "/.xmonad")
    barPid <- spawnPID externalStatusCmd
    let statusKiller = killStatusProcs statusproc barPid
    E.handle (myShutdownHook statusKiller) $ xmonad
           $ docks
           $ ewmh
           $ withRestartHook statusKiller
           $ withUrgencyHook NoUrgencyHook
           $ def {
      -- simple stuff
        terminal           = myTerminal,
        focusFollowsMouse  = myFocusFollowsMouse,
        borderWidth        = myBorderWidth,
        modMask            = myModMask,
        workspaces         = myWorkspaces,
        normalBorderColor  = myNormalBorderColor,
        focusedBorderColor = myFocusedBorderColor,

      -- key bindings
        keys               = myKeys,
        mouseBindings      = myMouseBindings,

      -- hooks, layouts
        layoutHook         = myLayoutHook,
        manageHook         = myManageHook,
        handleEventHook    = myEventHook,
        logHook            = myLogHook statusproc,
        startupHook        = myStartupHook
    }

main = do
    homeDir <- getHomeDirectory
    statusproc <- spawnPipe $ statusBarProc (homeDir ++ "/.xmonad")
    barPid <- spawnPID externalStatusCmd
    let statusKiller = killStatusProcs statusproc barPid
    E.handle (myShutdownHook statusKiller) $ xmonad
           $ docks
           $ ewmh
           $ withRestartHook statusKiller
           $ withUrgencyHook NoUrgencyHook
           $ def {
      -- simple stuff
        terminal           = myTerminal,
        focusFollowsMouse  = myFocusFollowsMouse,
        borderWidth        = myBorderWidth,
        modMask            = myModMask,
        workspaces         = myWorkspaces,
        normalBorderColor  = myNormalBorderColor,
        focusedBorderColor = myFocusedBorderColor,

      -- key bindings
        keys               = myKeys,
        mouseBindings      = myMouseBindings,

      -- hooks, layouts
        layoutHook         = myLayoutHook,
        manageHook         = myManageHook,
        handleEventHook    = myEventHook,
        logHook            = myLogHook statusproc,
        startupHook        = myStartupHook
    }
main = do
    homeDir <- getHomeDirectory
    statusproc <- spawnPipe $ statusBarProc (homeDir ++ "/.xmonad")
    barPid <- spawnPID externalStatusCmd
    let statusKiller = killStatusProcs statusproc barPid
    E.handle (myShutdownHook statusKiller) $ xmonad
           $ docks
           $ ewmh
           $ withRestartHook statusKiller
           $ withUrgencyHook NoUrgencyHook
           $ def {
      -- simple stuff
        terminal           = myTerminal,
        focusFollowsMouse  = myFocusFollowsMouse,
        borderWidth        = myBorderWidth,
        modMask            = myModMask,
        workspaces         = myWorkspaces,
        normalBorderColor  = myNormalBorderColor,
        focusedBorderColor = myFocusedBorderColor,

      -- key bindings
        keys               = myKeys,
        mouseBindings      = myMouseBindings,

      -- hooks, layouts
        layoutHook         = myLayoutHook,
        manageHook         = myManageHook,
        handleEventHook    = myEventHook,
        logHook            = myLogHook statusproc,
        startupHook        = myStartupHook
    }