-
Notifications
You must be signed in to change notification settings - Fork 6.5k
linux: Implement tray icons #13098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux: Implement tray icons #13098
Conversation
|
Oh wow, this is an interesting feature. Is this for the GNOME menu bar kind of area? I didn't know that was accessible over zbus. |
|
As for a fork of ashpd, I think that probably sounds correct. It would be great if this got upstreamed too, so that we're contributing to the ecosystem while we're at it :D |
|
Cool! Thanks for the explanation :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR, and I'm sorry I've let this go for so long!
As for the PR itself, the code looks good but I don't think we want to add large APIs to GPUI without a direct usage in Zed itself first. Further, I'm not sure we need the code in system_tray, or a new GPUI API at all. Can we re-use AppContext::set_menus and the related machinery for this feature?
I think I can extract the
I can reuse |
What's the major difference between that and the existing menu structs?
Even for that use case, we'd like there to be something to put in the menus on Linux. If you have ideas for what usually goes in a tray icon for editor apps, perhaps copying what VSCode does, that would be perfect! |
Global Application Menu is directly equivalent to the macOS menu bar AIUI? The main issue with it is that it's not that widely supported (and on KDE at least it's off by default). Anyway Populating it with the same items as the macOS menus would seem like the obvious thing to do? And if Zed knows that the global menu is being used, it could remove the hamburger menu from the title bar. |
|
|
Oh I understand! I think that one is ok to keep then :) |
That's what I was thinking. That said I don't think we have as much space as the macOS menu, right? We only get a single drop down, and then everything else has to be in submenus. That could be fine, but I'd be ok with streamlining the list as well :) |
|
Oh that's perfect then, we should do that! |
|
We're still interested in this, if there's a compelling use case in Zed or in an external project, but as there hasn't been one I'm going to close this PR for now. Please re-open if you want to continue! |
|
@XDeme1 |


Release Notes:
I don't think this is gonna be upstreamed to ashpd until StatusNotifier properly becomes a draft in XDG Desktop Portal
If this patch is too big I can split it in 3 parts maybe?
com.cannonical.dbusmenuorg.kde.StatusNotifierI have implemented support for setting only 1 tray icon. I don't know a use case for more than 1 tray item per application.
Todo:
com.cannonical.dbusmenu