safing / portmaster-ui

User Interfaces for Portmaster
https://github.com/safing/portmaster/
GNU General Public License v3.0
151 stars 20 forks source link

Systray icon support for Gnome 42+ #244

Closed PixsaOJ closed 6 months ago

PixsaOJ commented 2 years ago

What would you like to add or change?: I would like to have official support for Gnome 42 try icons.

Why do you and others need this?: libappindicator was deprecated, the only way to show try icon is to install additional extension. This breaks UI flow and adds its own UI element. Not everyone might like this implementation/hacky fix.

Additional info

Currently, Portmaster uses Fyne.io systray module.

https://github.com/fyne-io/fyne/issues/283

Here we see suggestion to use library: systray image

It has support for both: old libappindicator and new ayanata.

The referenced issue is old. I do not know if Fyne.io already has ayanata implementation.

Original issue I created here: #240

Edit: make sure to do research. I might be wrong about this ayanata thing.

dhaavi commented 2 years ago

Hey @PixsaOJ, thanks for opening the suggestion!

I'm not sure if libappindicator even had support for the Gnome42 tray icons.

libappindicator is deprecated, and we switched over to the ayanata implementation - BUT not all distros had that so it started failing. We do not want to build and distribute different binaries for different distros, so we switched to https://github.com/fyne-io/systray, which uses the DBUS interface directly from Go, without and C dependencies.

I think the best way to move forward is to work on adding Gnome42 tray icon support to the https://github.com/fyne-io/systray library.

Do you know where the specs for integrating with the Gnome42 tray icon system is?

PixsaOJ commented 2 years ago

Unfortunately, i just know about ayanata. I imagine some kind of detection if platform supports libappindicator or ayanata.

I imagine some kind of try/catch function. If current implementation fails, then import ayanata lib and use it.

Otherwise, i am not really familiar with GO language.

I agree, if fyne-io will implement Gnome42 way, it will be better.

dhaavi commented 2 years ago

I imagine some kind of try/catch function.

I've investigated that, but in this case this about a C import. Don't know of any way to try/catch that.

Can you give us some examples of apps that work well with your setup? If you find the time, it would also be great if you could research how they do the tray icon.

PixsaOJ commented 2 years ago

I don't think I'm experienced enough to do more research on this.

If anyone knows other go systray multi platform library, swapping for that would be eazy.

If not, then currently used library could be upgraded. I can make another issue on their GitHub.

Raphty commented 6 months ago

We are restructuring our co debase into a mono-repo where all Portmaster components will live happily together. For this reason this issue had to be closed.