const gotTheLock = app.requestSingleInstanceLock()
app.on('second-instance', (event, commandLine, workingDirectory) => {
// Someone tried to run a second instance, we should focus our window.
global.p3x.onenote.setVisible(true);
global.p3x.onenote.window.onenote.webContents.reload();
})
if (!gotTheLock) {
app.quit()
return
}