aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index 87f45e7fc..d947d96ca 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,6 +1,6 @@
1/* eslint-disable import/first */ 1/* eslint-disable import/first */
2 2
3import { app, BrowserWindow, ipcMain, session, dialog } from 'electron'; 3import { app, BrowserWindow, globalShortcut, ipcMain, session, dialog } from 'electron';
4 4
5import { emptyDirSync, ensureFileSync } from 'fs-extra'; 5import { emptyDirSync, ensureFileSync } from 'fs-extra';
6import { join } from 'path'; 6import { join } from 'path';
@@ -17,6 +17,7 @@ import {
17 isMac, 17 isMac,
18 isWindows, 18 isWindows,
19 isLinux, 19 isLinux,
20 altKey,
20} from './environment'; 21} from './environment';
21import { 22import {
22 isDevMode, 23 isDevMode,
@@ -360,6 +361,13 @@ const createWindow = () => {
360 } else { 361 } else {
361 mainWindow.show(); 362 mainWindow.show();
362 } 363 }
364
365 app.whenReady().then(() => {
366 // Toggle the window on 'Alt+X'
367 globalShortcut.register(`${altKey()}+X`, () => {
368 trayIcon.trayMenuTemplate[0].click();
369 });
370 });
363}; 371};
364 372
365// Allow passing command line parameters/switches to electron 373// Allow passing command line parameters/switches to electron