Skip to content

Commit

Permalink
#4 'show/hide' renamed to 'open main window' and persistent across pl…
Browse files Browse the repository at this point in the history
…atforms.
  • Loading branch information
skoro committed Dec 28, 2024
1 parent 6bc4258 commit 3400c5e
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,13 @@ const createTrayIcon = (mainWindow) => {
},
]);

// Gnome tray does not support actions by icon clicking.
// There is a menu item does the same as clicking on the icon to show/hide the main window.
if (isPlatformLinux()) {
contextMenu.insert(0, new MenuItem({
id: 'lnx-show-toggle',
label: 'Show/Hide',
click: () => mainWindow.toggleVisibility(),
}));
contextMenu.insert(1, new MenuItem({ type: 'separator' }));
}
contextMenu.insert(0, new MenuItem({
id: 'open-main-window',
label: 'Open Main Window',
click: () => mainWindow.show(),
}));

contextMenu.insert(1, new MenuItem({ type: 'separator' }));

tray.setContextMenu(contextMenu);
tray.setToolTip('Pasted');
Expand Down

0 comments on commit 3400c5e

Please sign in to comment.