… would be nice, since by nature this is an app that stays most of the time on the background. Major ~competitors~ alternatives do.
edit: original title was “on Windows” but of course it's a good idea for Linux as well.
This would be also useful for linux.
Example Electorn app which has tray suport: https://github.com/saenzramiro/rambox/blob/915a56088567406d79cac389ee37bf683b8e24c5/electron/tray.js
yes please. linux user here.
Rambox is MIT, so we could just copy-paste the code wholesale (with appropriate changes). The real work would be:
I'm happy to make a PR if maintainers think it's a good idea. Other than the checkbox, this is 100% Electron stuff, so there's no question of Riot vs. SDK. I could just opt out of the checkbox… a quick look at the code suggests that could be a little more than I would be willing to bite on as a first-timer.
We also need to consider the Multiple-Instances Issue. Most of the time you only want a Single Instance. Especially on modern systems like gnome3 (they do not have any solution for background-apps besides their internals).
Electron has support for Single Instances: https://github.com/electron/electron/blob/master/docs/api/app.md#appmakesingleinstancecallback
Possible Settings UI:
Other things to consider:
@carlos22 I agree on all all of that but multiple instances isn't really related.
Note that minimize to tray is the issue's actual title 😺 a tray icon that isn't used for close/minimize to tray, and displaying notifications on the tray icon, are related but out of scope IMO. And to be honest, if tray is supported, I don't see any reason to make it optional; let's not overcomplicate the settings UI.
The most common behaviour off the top of my head is that closing closes to tray, minimizing goes to taskbar (on both OSes). Of course with that bit being optional.

Screenshot from a similar app that will remain unnamed — that's the entire settings page for the “desktop app” tab.
@lalomartins Agreed.
Multiple Instances will be still a problem - because in most modern DEs you will run the app again if you are not using the notification area icon (which is often hidden by the OS [e.g. in Win7/10 and Gnome3))
But most important is close to tray. Lets focus on that :-)
Things missing for a perfect experience (for me of course ;-)):
The later one can be done with a command-line switch to not show the window (needs to be implemented) and using the systems 'Autorun' feature to start the app on login. Better for the users would be a option inside of the app. But there seems to be a solution for that: https://www.npmjs.com/package/auto-launch
Sorry for being slightly off-topic again, but I wanted to note my thoughts without creating new issues. Both features are useless until tray support is merged. I might start experimenting with the single-instance stuff in electron soon.
Well, somehow I missed the fact that you had a merged PR and spent a couple of hours doing the same. Ah well, I learned a bit about Electron I guess 😆 meanwhile, thanks!
If you want to copy “red dot” (pending notifications) support from my version, it's at https://github.com/lalomartins/riot-web/tree/tray
PR merged
Most helpful comment
This would be also useful for linux.
Example Electorn app which has tray suport: https://github.com/saenzramiro/rambox/blob/915a56088567406d79cac389ee37bf683b8e24c5/electron/tray.js