aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js13
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
72const settings = new Settings('app', DEFAULT_APP_SETTINGS);
73const proxySettings = new Settings('proxy');
74
75// add `liftSingleInstanceLock` to settings.json to override the single instance lock
76const liftSingleInstanceLock = settings.get('liftSingleInstanceLock') || false;
77
71// Force single window 78// Force single window
72const gotTheLock = app.requestSingleInstanceLock(); 79const gotTheLock = liftSingleInstanceLock ? true : app.requestSingleInstanceLock();
73if (!gotTheLock) { 80if (!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
120const settings = new Settings('app', DEFAULT_APP_SETTINGS);
121const proxySettings = new Settings('proxy');
122
123// Disable GPU acceleration 126// Disable GPU acceleration
124if (!settings.get('enableGPUAcceleration')) { 127if (!settings.get('enableGPUAcceleration')) {
125 debug('Disable GPU Acceleration'); 128 debug('Disable GPU Acceleration');