Add shortcut for opening hamburger menu (Windows) (#3444)

* Add shortcut for opening hamburger menu (Windows)

* Open hamburger menu if showHamburgerMenu config is truthy
This commit is contained in:
doniyor2109 2019-03-31 07:39:43 +05:00 committed by Benjamin Staneck
parent 4350ecd73a
commit 81ff38c8d9
2 changed files with 8 additions and 2 deletions

View file

@ -1,5 +1,5 @@
const {app} = require('electron');
const {openConfig} = require('./config');
const {app, Menu} = require('electron');
const {openConfig, getConfig} = require('./config');
const {updatePlugins} = require('./plugins');
const {installCLI} = require('./utils/cli-install');
@ -103,6 +103,11 @@ const commands = {
},
'cli:install': () => {
installCLI(true);
},
'window:hamburgerMenu': () => {
if (getConfig().showHamburgerMenu) {
Menu.getApplicationMenu().popup({x: 15, y: 15});
}
}
};

View file

@ -3,6 +3,7 @@
"window:reload": "ctrl+shift+r",
"window:reloadFull": "ctrl+shift+f5",
"window:preferences": "ctrl+,",
"window:hamburgerMenu": "alt",
"zoom:reset": "ctrl+0",
"zoom:in": "ctrl+=",
"zoom:out": "ctrl+-",