Skip to content

Commit 4de4f14

Browse files
committed
Tray Icon, toggle window on click
1 parent 7557924 commit 4de4f14

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

main.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ app.on('ready', function() {
4343
]);
4444

4545
trayIcon.setToolTip('GitHub Notifications on your menu bar.');
46-
trayIcon.setContextMenu(trayMenu);
46+
47+
if (isLinux) {
48+
trayIcon.setContextMenu(trayMenu);
49+
} else {
50+
trayIcon.on('click', () => {
51+
appWindow.isFocused() ? appWindow.hide() : appWindow.show();
52+
});
53+
}
54+
4755
return trayIcon;
4856
}
4957

0 commit comments

Comments
 (0)