Added workaround for trayicon not working under Linux #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes #30.
I added a workaround to the tray icon not working under Linux.
Did some searching and it seems that electrons tray icon under Linux doesn't work with click events.
Source: https://github.com/electron/electron/blob/master/docs/api/tray.md - See the Platform limitations section.
So as a workaround i implemented a context menu on the tray icon that allows to hide / show the main windows and quit the program.
I also made it so when closing the windows ctrl+w under Linux it only hides the window instead of nulling it. This allows to quick "remove" the window and restore it from the tray icon.
I have only tested this under Linux with i3wm as my window manager.