From 0ba5820cf42fd0184178b5cdbf00245ab73dbe8e Mon Sep 17 00:00:00 2001 From: Tanuj Pancholi <56783833+tanuj-22@users.noreply.github.com> Date: Tue, 2 Jan 2024 00:32:30 +0530 Subject: [PATCH] Added Show in Dock Toggle and System Tray Feature (#90) * Issue #62 Added Show in Dock, System Tray Toggle * show dock toggle for mac only * Add Open Heynote and Quit Heynote to Tray context menu * Add Template Image as menu bar icon on MacOS https://www.electronjs.org/docs/latest/api/native-image#template-image * Use isMac, isWindows and isLinux for platform checks * Add new tray/favicon * Use favicon.ico as windows tray icon * Show window on Tray double-click * Open window when Tray is single clicked on non Mac platforms * Fix indentation * Remove unused import --------- Co-authored-by: Jonatan Heyman --- electron/config.js | 4 ++ electron/main/index.ts | 60 ++++++++++++++++++++++++--- electron/main/menu.ts | 23 +++++++++- public/favicon.ico | Bin 12399 -> 15406 bytes public/iconTemplate.png | Bin 0 -> 2077 bytes public/iconTemplate@2x.png | Bin 0 -> 2217 bytes src/components/settings/Settings.vue | 26 ++++++++++++ 7 files changed, 106 insertions(+), 7 deletions(-) create mode 100644 public/iconTemplate.png create mode 100644 public/iconTemplate@2x.png diff --git a/electron/config.js b/electron/config.js index 63ae2d6c..dfacda02 100644 --- a/electron/config.js +++ b/electron/config.js @@ -30,6 +30,8 @@ const schema = { "enableGlobalHotkey": {type: "boolean", default: false}, "globalHotkey": {type: "string", default: "CmdOrCtrl+Shift+H"}, "bufferPath" : {type: "string", default: ""}, + "showInDock": {type: "boolean", default: true}, + "showInMenu": {type: "boolean", default: false}, }, }, @@ -55,6 +57,8 @@ const defaults = { enableGlobalHotkey: false, globalHotkey: "CmdOrCtrl+Shift+H", bufferPath: "", + showInDock: true, + showInMenu: false, }, theme: "system", } diff --git a/electron/main/index.ts b/electron/main/index.ts index f05efd43..121126ba 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -1,14 +1,14 @@ -import { app, BrowserWindow, shell, ipcMain, Menu, nativeTheme, globalShortcut } from 'electron' +import { app, BrowserWindow, Tray, shell, ipcMain, Menu, nativeTheme, globalShortcut, nativeImage } from 'electron' import { release } from 'node:os' import { join } from 'node:path' import * as jetpack from "fs-jetpack"; -import menu from './menu' +import { menu, getTrayMenu } from './menu' import { initialContent, initialDevContent } from '../initial-content' import { WINDOW_CLOSE_EVENT, SETTINGS_CHANGE_EVENT } from '../constants'; import CONFIG from "../config" import { onBeforeInputEvent } from "../keymap" -import { isDev } from '../detect-platform'; +import { isDev, isMac, isWindows } from '../detect-platform'; import { initializeAutoUpdate, checkForUpdates } from './auto-update'; import { fixElectronCors } from './cors'; import { getBufferFilePath, Buffer } from './buffer'; @@ -34,7 +34,7 @@ process.env.PUBLIC = process.env.VITE_DEV_SERVER_URL if (release().startsWith('6.1')) app.disableHardwareAcceleration() // Set application name for Windows 10+ notifications -if (process.platform === 'win32') app.setAppUserModelId(app.getName()) +if (isWindows) app.setAppUserModelId(app.getName()) if (!process.env.VITE_DEV_SERVER_URL && !app.requestSingleInstanceLock()) { app.quit() @@ -51,6 +51,7 @@ Menu.setApplicationMenu(menu) // process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true' export let win: BrowserWindow | null = null +let tray: Tray | null = null; // Here, you can also use other preload const preload = join(__dirname, '../preload/index.js') const url = process.env.VITE_DEV_SERVER_URL @@ -148,6 +149,23 @@ async function createWindow() { fixElectronCors(win) } +function createTray() { + let img + if (isMac) { + img = nativeImage.createFromPath(join(process.env.PUBLIC, "iconTemplate.png")) + } else { + img = nativeImage.createFromPath(join(process.env.PUBLIC, 'favicon.ico')); + } + tray = new Tray(img); + tray.setToolTip("Heynote"); + tray.setContextMenu(getTrayMenu(win)); + tray.addListener("click", () => { + if (!isMac) { + win?.show() + } + }) +} + function registerGlobalHotkey() { globalShortcut.unregisterAll() if (CONFIG.get("settings.enableGlobalHotkey")) { @@ -176,14 +194,37 @@ function registerGlobalHotkey() { } } +function registerShowInDock() { + // dock is only available on macOS + if (isMac) { + if (CONFIG.get("settings.showInDock")) { + app.dock.show().catch((error) => { + console.log("Could not show app in dock: ", error); + }); + } else { + app.dock.hide(); + } + } +} + +function registerShowInMenu() { + if (CONFIG.get("settings.showInMenu")) { + createTray() + } else { + tray?.destroy() + } +} + app.whenReady().then(createWindow).then(async () => { initializeAutoUpdate(win) registerGlobalHotkey() + registerShowInDock() + registerShowInMenu() }) app.on('window-all-closed', () => { win = null - if (process.platform !== 'darwin') app.quit() + if (!isMac) app.quit() }) app.on('second-instance', () => { @@ -245,7 +286,8 @@ ipcMain.handle('settings:set', (event, settings) => { currentKeymap = settings.keymap } let globalHotkeyChanged = settings.enableGlobalHotkey !== CONFIG.get("settings.enableGlobalHotkey") || settings.globalHotkey !== CONFIG.get("settings.globalHotkey") - + let showInDockChanged = settings.showInDock !== CONFIG.get("settings.showInDock"); + let showInMenuChanged = settings.showInMenu !== CONFIG.get("settings.showInMenu"); CONFIG.set("settings", settings) win?.webContents.send(SETTINGS_CHANGE_EVENT, settings) @@ -253,4 +295,10 @@ ipcMain.handle('settings:set', (event, settings) => { if (globalHotkeyChanged) { registerGlobalHotkey() } + if (showInDockChanged) { + registerShowInDock() + } + if (showInMenuChanged) { + registerShowInMenu() + } }) diff --git a/electron/main/menu.ts b/electron/main/menu.ts index 60b7d33a..e1e9f4f9 100644 --- a/electron/main/menu.ts +++ b/electron/main/menu.ts @@ -140,5 +140,26 @@ const template = [ } ] -export default Menu.buildFromTemplate(template) +export const menu = Menu.buildFromTemplate(template) + + +export function getTrayMenu(win) { + return Menu.buildFromTemplate([ + { + label: 'Open Heynote', + click: () => { + win.show() + }, + }, + { type: 'separator' }, + ...template, + { type: 'separator' }, + { + label: 'Quit', + click: () => { + app.quit() + }, + }, + ]) +} diff --git a/public/favicon.ico b/public/favicon.ico index 3198b85594af839bc128dcb940d0d0594a3f49ce..54cede654ebba8f635c39af9c3e2ce57df3f1858 100644 GIT binary patch literal 15406 zcmeHNYfMx}6rQaZ`^SW)n3yzeNs}6XG=Ubo}O zEofV7v?bN*LVXL0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2W6@ zLrYVR$74U}o@6z^Q#-SPK?0XYRP_ccfPwJT$i9erG}T{)Ge5@_6-=7nKM; zo&8hf)Qv|Ye7lYYR;=_fK0O|A%(q-I{`6%uQdy9kbvYyW#-{F|`)eBw<=>TUy7c{^ zcH8YQ&qp!aYE~Rr$eZSN2wlBkjoVRv-Gb9syCs?jgPPy?=KPVKW_=Zvmi25;qt+%> zq_E91%68>=M30Es=jD6DZNbJ`{hJ|`2FXd$p{6@SEwzEOFU{Im>F)8@qHA~2#?9=l zd4~LJ;PvKhNyuU#XlM}kxG0kYAA@?~N=0mH=CTJBho-s34qkR7N;xaV)JRlCoa_imQeM0Ven zw(J>qrbN2iTTs5bwj`zfc;F65@9pQG-|Esi-p})@Sb3pjx_8~}3!BI*oVFKgYEwPP)9gQvtPfooK2jTiHo9b6DFh`>8QPt+AcB}UGH@k+17QJ#wFV61d6=Qd~e;CU6B*o6ja~J;ui2DvN literal 0 HcmV?d00001 diff --git a/src/components/settings/Settings.vue b/src/components/settings/Settings.vue index 045c0ce5..72bee859 100644 --- a/src/components/settings/Settings.vue +++ b/src/components/settings/Settings.vue @@ -28,6 +28,8 @@ allowBetaVersions: this.initialSettings.allowBetaVersions, enableGlobalHotkey: this.initialSettings.enableGlobalHotkey, globalHotkey: this.initialSettings.globalHotkey, + showInDock: this.initialSettings.showInDock, + showInMenu: this.initialSettings.showInMenu, autoUpdate: this.initialSettings.autoUpdate, activeTab: "general", @@ -58,6 +60,8 @@ allowBetaVersions: this.allowBetaVersions, enableGlobalHotkey: this.enableGlobalHotkey, globalHotkey: this.globalHotkey, + showInDock: this.showInDock, + showInMenu: this.showInMenu || !this.showInDock, autoUpdate: this.autoUpdate, }) }, @@ -130,6 +134,28 @@ /> +
+
+

Show In

+ + +
+