Restore window if minimized when global hotkey is pressed

This commit is contained in:
Jonatan Heyman 2023-12-10 23:32:17 +01:00
parent 192bd2a62f
commit 9e50446417

View File

@ -154,6 +154,9 @@ function registerGlobalHotkey() {
try {
const ret = globalShortcut.register(CONFIG.get("settings.globalHotkey"), () => {
app.focus({steal: true})
if (win?.isMinimized()) {
win?.restore()
}
})
} catch (error) {
console.log("Could not register global hotkey:", error)