From 9e50446417b345a2f1ce1266b9bf24f1f45f9b91 Mon Sep 17 00:00:00 2001 From: Jonatan Heyman Date: Sun, 10 Dec 2023 23:32:17 +0100 Subject: [PATCH] Restore window if minimized when global hotkey is pressed --- electron/main/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/electron/main/index.ts b/electron/main/index.ts index 80f6b25..414744e 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -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)