From 6ae39f167b70072d754bbb7428b38fd154ea1e75 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Tue, 20 Mar 2012 13:31:49 -0700 Subject: [PATCH] loads ~/.atom/index.coffee when window is loaded --- src/atom/window.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/atom/window.coffee b/src/atom/window.coffee index f9200a7e7..ed8af4494 100644 --- a/src/atom/window.coffee +++ b/src/atom/window.coffee @@ -19,6 +19,7 @@ windowAdditions = startup: (url) -> @setUpKeymap() @attachRootView(url) + @loadUserConfig() $(window).on 'close', => @close() $(window).focus() atom.windowOpened this @@ -45,6 +46,13 @@ windowAdditions = @rootView = new RootView {url} $(@rootViewParentSelector).append @rootView + loadUserConfig: (path="~/.atom") -> + absolutePath = fs.absolute(path) + try + require absolutePath if fs.exists(absolutePath) + catch error + console.error "Failed to load `#{absolutePath}`", error + requireStylesheet: (path) -> fullPath = require.resolve(path) content = fs.read(fullPath)