summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/features/appearance/index.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/features/appearance/index.ts b/src/features/appearance/index.ts
index b3cbd3347..9c9f3e175 100644
--- a/src/features/appearance/index.ts
+++ b/src/features/appearance/index.ts
@@ -2,6 +2,7 @@ import color from 'color';
2import { reaction } from 'mobx'; 2import { reaction } from 'mobx';
3import TopBarProgress from 'react-topbar-progress-indicator'; 3import TopBarProgress from 'react-topbar-progress-indicator';
4 4
5import { pathExistsSync, readFileSync } from 'fs-extra';
5import { isWindows, isLinux } from '../../environment'; 6import { isWindows, isLinux } from '../../environment';
6import { 7import {
7 DEFAULT_APP_SETTINGS, 8 DEFAULT_APP_SETTINGS,
@@ -10,6 +11,7 @@ import {
10 SIDEBAR_SERVICES_LOCATION_CENTER, 11 SIDEBAR_SERVICES_LOCATION_CENTER,
11 SIDEBAR_SERVICES_LOCATION_BOTTOMRIGHT, 12 SIDEBAR_SERVICES_LOCATION_BOTTOMRIGHT,
12} from '../../config'; 13} from '../../config';
14import { userDataPath } from '../../environment-remote';
13 15
14const STYLE_ELEMENT_ID = 'custom-appearance-style'; 16const STYLE_ELEMENT_ID = 'custom-appearance-style';
15 17
@@ -34,6 +36,11 @@ function darkenAbsolute(originalColor, absoluteChange) {
34 return originalColor.lightness(originalLightness - absoluteChange); 36 return originalColor.lightness(originalLightness - absoluteChange);
35} 37}
36 38
39function generateUserCustomCSS() {
40 const path = userDataPath('config', 'custom.css');
41 return pathExistsSync(path) ? readFileSync(path).toString() : '';
42}
43
37function generateAccentStyle(accentColorStr) { 44function generateAccentStyle(accentColorStr) {
38 let accentColor; 45 let accentColor;
39 try { 46 try {
@@ -421,6 +428,8 @@ function generateStyle(settings, app) {
421 style += generateOpenWorkspaceStyle(); 428 style += generateOpenWorkspaceStyle();
422 } 429 }
423 430
431 style += generateUserCustomCSS();
432
424 return style; 433 return style;
425} 434}
426 435