From 0cab0b08c7871ff1c950d8f1a23089da06939708 Mon Sep 17 00:00:00 2001 From: Amit Haridas Date: Mon, 14 Sep 2026 09:01:43 +0530 Subject: [PATCH] feat(menu): add 'Today's Daily Note' under Tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same handler as the global Ctrl+Alt+D shortcut — opens (or creates) the local-date YYYY-MM-DD.md and sends a file-opened IPC to the renderer. Mirrors the Quick Note pattern in the same submenu (global shortcut + menu entry, both pointing at openOrCreate). Amit Haridas --- src/main.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/main.js b/src/main.js index b0c0603..e399c60 100644 --- a/src/main.js +++ b/src/main.js @@ -1542,6 +1542,30 @@ function createMenu() { accelerator: 'CmdOrCtrl+Alt+Q', click: () => openQuickNoteWindow(), }, + { + // Daily journal: opens (or creates) today's YYYY-MM-DD.md and + // loads it in the existing tab. Global Ctrl+Alt+D works even + // when the app is unfocused. + label: "Today's Daily Note", + accelerator: 'CmdOrCtrl+Alt+D', + click: () => { + try { + const result = DailyNotes.openOrCreate({ + date: new Date(), + dir: dailyNotesDir(), + templateDir: dailyNotesTemplateDir(), + fs, + pathUtil: path, + now: new Date(), + }); + if (mainWindow && !mainWindow.isDestroyed()) { + mainWindow.webContents.send('file-opened', { filePath: result.path }); + } + } catch (err) { + console.warn('[daily-notes] menu open failed:', err && err.message); + } + }, + }, { label: 'Document Compare', click: () => mainWindow.webContents.send('show-document-compare'),