Follows discussion in https://github.com/jiahaog/nativefier/issues/318 . For example, how Icons8 implements this in their interface:

The available options from above are:
When window loses focus
Application icon is in
BUT, sort of like you suggested, I think the bulk of this feature could be achieved with one additional option. Something like:
[tray-icon-only]
--tray-icon-only <path>
So this would encompass the following:
[tray-icon]
--tray-icon <path>
As for the option of where to display the application icon:
[show-icon-in]
--show-icon-in <value>
I'm not sure how to describe this without using Mac-specific language, and maybe passing in a string like this would be a bad idea, but maybe available values could include both Mac and cross-platform equivalents. For example:
For what to do when the window focus is lost, this one is hard. Maybe...
[hide-unfocused]
Anyway, let me know what you think about any of this. Happy to help work through this more if needed. Also, thanks for making Nativefier. I'm a big fan!
That could be really cool for messaging apps, like Discord and GroupMe! I know Discord has a dynamic favicon that indicates unread status, could there be some way to pull that for the system tray icon?
Discord has a dynamic favicon that indicates unread status, could there be some way to pull that for the system tray icon?
@Aidoboy the --counter option already does kind-of-that on macOS in the Dock; yes, would be nice to have similar behavior in this hypothetical tray feature. Regarding updating the whole icon using the app's favicon, that might mean horrible-looking tray icons (favicons are often smaaaall!). Not as ugly as in the (bigger) dock (see discussion at https://github.com/jiahaog/nativefier/issues/367#issuecomment-302695787 ), but staying with --counter's behavior of overlaying a count on the icon (based on a detected number in the page title) might yield better results.
@jamiewilson @Aidoboy just a note to manage expectations: as long as no one does feature requests, they remain requests. There are lots to do and we're only a few maintainers; if you want to give a stab at implementing this feature, the developer guide awaits you 馃檪.
@ronjouch Absolutely. I'll take a deeper look at the source and see if I might be able to tackle this myself.
@Aidoboy I think having a sort of 'active' state of the system tray icon could be good. But maybe we should break that idea into a different issue, since there might be more discussion needed around it in particular.
@ronjouch Yeah, I was just talking about the tray icon. I wonder what overlaying the tray icon with the favicon would look like? Nova Launcher on Android does something like that. Here's and Android Authority article on it.
@jamiewilson That might be a good idea. Edit: I don't have time right now though. :stuck_out_tongue:
Closing this as https://github.com/jiahaog/nativefier/pull/457 added a --tray flag. I don't think the new flag covers everything discussed in this issue, but it's a start. Please try it, then once familiar it, feel free to discuss missing stuff and we can re-open with a list of incremental improvements. All props go to @omouren for the work on #457.
Most helpful comment
@ronjouch Absolutely. I'll take a deeper look at the source and see if I might be able to tackle this myself.
@Aidoboy I think having a sort of 'active' state of the system tray icon could be good. But maybe we should break that idea into a different issue, since there might be more discussion needed around it in particular.