Skip to content

Commit

Permalink
Move app to tray on close button, disable keyboard shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
n9lsjr committed Apr 7, 2024
1 parent 22e79fc commit a0e9155
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/backend/electron.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const {
Menu,
nativeTheme,
systemPreferences,
globalShortcut
} = require('electron')
const serve = require('electron-serve')
const { join } = require('path')
Expand Down Expand Up @@ -95,6 +96,9 @@ function createWindow() {
event.preventDefault();
});

globalShortcut.unregisterAll()


return mainWindow
}

Expand Down Expand Up @@ -151,7 +155,10 @@ app.on('window-all-closed', () => {
})

ipcMain.on('close', () => {
app.quit()
mainWindow.hide()
if (process.platform === 'darwin') {
app.dock.hide()
}
})

ipcMain.on('min', () => {
Expand Down

0 comments on commit a0e9155

Please sign in to comment.