diff options
-rw-r--r-- | src/index.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/index.js b/src/index.js index 7de7a5e1c..3056a8bec 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -64,8 +64,15 @@ if (isWindows) { | |||
64 | app.setAppUserModelId(appId); | 64 | app.setAppUserModelId(appId); |
65 | } | 65 | } |
66 | 66 | ||
67 | // Initialize Settings | ||
68 | const settings = new Settings('app', DEFAULT_APP_SETTINGS); | ||
69 | const proxySettings = new Settings('proxy'); | ||
70 | |||
71 | // add `liftSingleInstanceLock` to settings.json to override the single instance lock | ||
72 | const liftSingleInstanceLock = settings.get('liftSingleInstanceLock') || false; | ||
73 | |||
67 | // Force single window | 74 | // Force single window |
68 | const gotTheLock = app.requestSingleInstanceLock(); | 75 | const gotTheLock = liftSingleInstanceLock ? true : app.requestSingleInstanceLock(); |
69 | if (!gotTheLock) { | 76 | if (!gotTheLock) { |
70 | app.quit(); | 77 | app.quit(); |
71 | } else { | 78 | } else { |
@@ -112,10 +119,6 @@ if (isLinux && ['Pantheon', 'Unity:Unity7'].indexOf(process.env.XDG_CURRENT_DESK | |||
112 | process.env.XDG_CURRENT_DESKTOP = 'Unity'; | 119 | process.env.XDG_CURRENT_DESKTOP = 'Unity'; |
113 | } | 120 | } |
114 | 121 | ||
115 | // Initialize Settings | ||
116 | const settings = new Settings('app', DEFAULT_APP_SETTINGS); | ||
117 | const proxySettings = new Settings('proxy'); | ||
118 | |||
119 | // Disable GPU acceleration | 122 | // Disable GPU acceleration |
120 | if (!settings.get('enableGPUAcceleration')) { | 123 | if (!settings.get('enableGPUAcceleration')) { |
121 | debug('Disable GPU Acceleration'); | 124 | debug('Disable GPU Acceleration'); |