diff options
Diffstat (limited to 'src/index.js')
-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 a4880a25a..87aa6357b 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -68,8 +68,15 @@ if (isWindows) { | |||
68 | app.setAppUserModelId(appId); | 68 | app.setAppUserModelId(appId); |
69 | } | 69 | } |
70 | 70 | ||
71 | // Initialize Settings | ||
72 | const settings = new Settings('app', DEFAULT_APP_SETTINGS); | ||
73 | const proxySettings = new Settings('proxy'); | ||
74 | |||
75 | // add `liftSingleInstanceLock` to settings.json to override the single instance lock | ||
76 | const liftSingleInstanceLock = settings.get('liftSingleInstanceLock') || false; | ||
77 | |||
71 | // Force single window | 78 | // Force single window |
72 | const gotTheLock = app.requestSingleInstanceLock(); | 79 | const gotTheLock = liftSingleInstanceLock ? true : app.requestSingleInstanceLock(); |
73 | if (!gotTheLock) { | 80 | if (!gotTheLock) { |
74 | app.quit(); | 81 | app.quit(); |
75 | } else { | 82 | } else { |
@@ -116,10 +123,6 @@ if (isLinux && ['Pantheon', 'Unity:Unity7'].indexOf(process.env.XDG_CURRENT_DESK | |||
116 | process.env.XDG_CURRENT_DESKTOP = 'Unity'; | 123 | process.env.XDG_CURRENT_DESKTOP = 'Unity'; |
117 | } | 124 | } |
118 | 125 | ||
119 | // Initialize Settings | ||
120 | const settings = new Settings('app', DEFAULT_APP_SETTINGS); | ||
121 | const proxySettings = new Settings('proxy'); | ||
122 | |||
123 | // Disable GPU acceleration | 126 | // Disable GPU acceleration |
124 | if (!settings.get('enableGPUAcceleration')) { | 127 | if (!settings.get('enableGPUAcceleration')) { |
125 | debug('Disable GPU Acceleration'); | 128 | debug('Disable GPU Acceleration'); |