Merge pull request #216 from github/user-prefs

Load settings from user.coffee and user.css
This commit is contained in:
Justin Palmer
2013-01-31 10:36:23 -08:00
6 changed files with 33 additions and 6 deletions

View File

@@ -53,10 +53,16 @@ _.extend atom,
themeNames = config.get("core.themes") ? ['Atom - Dark', 'IR_Black']
themeNames = [themeNames] unless _.isArray(themeNames)
@loadTheme(themeName) for themeName in themeNames
@loadUserStylesheet()
loadTheme: (name) ->
@loadedThemes.push Theme.load(name)
loadUserStylesheet: ->
userStylesheetPath = fs.join(config.configDirPath, 'user.css')
if fs.isFile(userStylesheetPath)
applyStylesheet(userStylesheetPath, fs.read(userStylesheetPath), 'userTheme')
getAtomThemeStylesheets: ->
themeNames = config.get("core.themes") ? ['Atom - Dark', 'IR_Black']
themeNames = [themeNames] unless _.isArray(themeNames)

View File

@@ -4,7 +4,7 @@ EventEmitter = require 'event-emitter'
configDirPath = fs.absolute("~/.atom")
configJsonPath = fs.join(configDirPath, "config.json")
userInitScriptPath = fs.join(configDirPath, "atom.coffee")
userInitScriptPath = fs.join(configDirPath, "user.coffee")
bundledPackagesDirPath = fs.join(resourcePath, "src/packages")
bundledThemesDirPath = fs.join(resourcePath, "themes")
vendoredPackagesDirPath = fs.join(resourcePath, "vendor/packages")