From af0106c1e90dba0a66c7f162a23f1060b28beaa1 Mon Sep 17 00:00:00 2001 From: Eric Adamski Date: Thu, 31 May 2018 08:37:03 -0400 Subject: [PATCH] Add ability to drag files into Tray to open Alchemy * On window blur Alchemy is minimized --- main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.js b/main.js index bfb4bfa..1776790 100644 --- a/main.js +++ b/main.js @@ -14,8 +14,12 @@ const mb = menubar({ mb.on('ready', () => { console.log('App started in menu bar.') configure(mb) + + mb.tray.on('drag-enter', () => mb.showWindow()) }) +mb.on('focus-lost', () => mb.hideWindow()); + ipcMain.on('APP_PATH_REQUEST', (event) => { event.sender.send('APP_PATH_REPLY', mb.app.getAppPath()) })