mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 14:15:50 -06:00
[GH-ISSUE #101] Tray Support #62
Labels
No labels
bug
documentation
enhancement
libui issue
pull-request
question
wait for libui implementation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/proton-native#62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JackPyro on GitHub (May 4, 2018).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/101
Is Tray supported or gonna be supported in future versions?
@parro-it commented on GitHub (May 4, 2018):
Actually libui-node does not support them, because they are not implemented in libui (see this issue there: https://github.com/andlabs/libui/issues/216).
You can try to 👍🏻 that issue to get them implemented there.
Or alternatively, we can use other existing npm packages to implement it?
@kusti8 any thoughts?
@kusti8 commented on GitHub (May 4, 2018):
I don't think working with other node packages is going to work that well. I looked quickly and there doesn't seem to be anything cross platform and I assume all the solutions have their own blocking event loop and implementation into JSX is going to be non trivial.
@parro-it commented on GitHub (May 4, 2018):
If
libuidoes not want to implement it, I could write a new package that leverage the event loop of libui-node@kusti8 commented on GitHub (May 4, 2018):
I don't think that would be that good and it could get out of hand quickly. @JackPyro what exactly do you mean by tray? There's this https://github.com/mikaelbr/node-notifier which can send notifications. But if you want a tray icon it doesn't seem like there's anything good that works.
@thormengkheang commented on GitHub (May 10, 2018):
Would be nice if it has system tray support
@JackPyro commented on GitHub (May 10, 2018):
@kusti8 More like this:

I've got my answer, so feel free to close this issue.
@Darkle commented on GitHub (Jun 5, 2018):
What about using https://github.com/zaaack/node-systray?
@parro-it commented on GitHub (Jun 5, 2018):
Seems nice
@parro-it commented on GitHub (Jun 5, 2018):
But there's not C++ code, neither C, how could it work?
@kusti8 commented on GitHub (Jun 5, 2018):
Seems like it uses https://github.com/zaaack/systray-portable which is Go
code.
On Tue, Jun 5, 2018, 7:01 AM Andrea Parodi notifications@github.com wrote:
@parro-it commented on GitHub (Jun 5, 2018):
ah ok not it make sense
@Darkle commented on GitHub (Jun 5, 2018):
https://github.com/zaaack/systray-portable seems to include precompiled binaries for each OS though. Would it be possible to include the binary when libui is compiled?
@parro-it commented on GitHub (Jun 5, 2018):
@Darkle, if you mean in libui-node:
libui-node is and will remain only a binding library to what libui implements. But what's wrong using systray-portable directly in app code?
@kusti8 commented on GitHub (Jun 5, 2018):
Once you get down the road of adding random binaries to stuff like libui-node or proton native, it gets to be a mess, not just because you have to manage one more build scheme, but also because you end up bloating it with people asking why not this binary also.
I'll make a page in the docs to address third party solutions such as this, but they should be separate.
@parro-it commented on GitHub (Jun 5, 2018):
We should start an awesome-desktop-js list...
@Darkle commented on GitHub (Jun 5, 2018):
Here are some links I have stored in Evernote related to js and desktop app dev:
- https://github.com/nexe/nexe
- https://github.com/pmq20/node-packer
- http://nectarjs.com/
- https://github.com/zeit/pkg
- http://thecodebarbarian.com/standalone-express-apis-binaries-with-pkg.html
- https://www.npmjs.com/package/lone
- https://news.ycombinator.com/item?id=8604716
(some might be a little old)
@khanhas commented on GitHub (Jun 5, 2018):
Electron supports creating Tray menu out of the box.
Tray as well as toast notification are basic elements of what we calls "Apps" nowadays.
Using third-party package is fine but I think you guys should aim proton-native as a one-go solution to create a complete app.
@mischnic commented on GitHub (Jun 5, 2018):
Example for node-systray with proton-native:
The only glue code needed is calling the
killmethod from node-systray.@styfle commented on GitHub (Jun 5, 2018):
@Darkle Do you mind if I make the awesome list starting with your notes?
@Darkle commented on GitHub (Jun 5, 2018):
@styfle Yeah sure thing.
@parro-it commented on GitHub (Jun 5, 2018):
@styfle I also have a gist where I collected link, articles and interesting snippets of code, mainly about libuv and GUI event loops https://gist.github.com/parro-it/842ff46a86142c30b1f94f97bb738418.
Really caotic, but something could be useful...
@Darkle commented on GitHub (Jun 5, 2018):
@mischnic re:
https://zaaack.github.io/node-systray/classes/index.systray.html#kill
Why would you kill systray here, but not the node process?
@kusti8 commented on GitHub (Jun 5, 2018):
@Darkle because this is called when the window or app is closed, so the node process is already stopping, so the last thing we need to stop is the systray. The event loop gets stopped when you have a last Window left or the app quits through Menu.
@Darkle commented on GitHub (Jun 5, 2018):
Ah ok. There might be some people that are expecting different behaviour though. It's fairly common for apps that have a system tray icon to remain open after you close their apps main window.
When you add info to the proton-native docs about this systray module, it might be a good idea to mention this as well, in case people expect their app to stick around after the window closes because of the systray icon.
@styfle commented on GitHub (Jun 6, 2018):
@Darkle @parro-it I got a list started here: https://github.com/styfle/awesome-desktop-js
Feel free to send a PR 👍