From 95d7c89ec52dab8cf677ff0bf46b0e3d7839b41b Mon Sep 17 00:00:00 2001 From: Justin Palmer Date: Wed, 30 Jan 2013 16:00:45 -0800 Subject: [PATCH] load styles from ~/.atom/user.css --- src/app/atom.coffee | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/atom.coffee b/src/app/atom.coffee index 455382926..43c4d942d 100644 --- a/src/app/atom.coffee +++ b/src/app/atom.coffee @@ -7,6 +7,8 @@ LoadTextMatePackagesTask = require 'load-text-mate-packages-task' messageIdCounter = 1 originalSendMessageToBrowserProcess = atom.sendMessageToBrowserProcess +configDirPath = fs.absolute("~/.atom") +userStylePath = fs.join(configDirPath, "user.css") _.extend atom, exitWhenDone: window.location.params.exitWhenDone @@ -53,10 +55,15 @@ _.extend atom, themeNames = config.get("core.themes") ? ['Atom - Dark', 'IR_Black'] themeNames = [themeNames] unless _.isArray(themeNames) @loadTheme(themeName) for themeName in themeNames + @loadUserStyles() loadTheme: (name) -> @loadedThemes.push Theme.load(name) + loadUserStyles: -> + if fs.exists(userStylePath) + applyStylesheet(userStylePath, fs.read(userStylePath), 'userTheme') + getAtomThemeStylesheets: -> themeNames = config.get("core.themes") ? ['Atom - Dark', 'IR_Black'] themeNames = [themeNames] unless _.isArray(themeNames)