Skip to content
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

[feat] Use ksni crate for tray icons on Linux #11293

Open
dfaust opened this issue Oct 9, 2024 · 5 comments
Open

[feat] Use ksni crate for tray icons on Linux #11293

dfaust opened this issue Oct 9, 2024 · 5 comments

Comments

@dfaust
Copy link

dfaust commented Oct 9, 2024

Describe the problem

Currently Tauri uses libappindicator to create tray icons on Linux. But it has far fewer features than the xdg standard, as well as macOS and Windows.
There are multiple bug reports and feature requests regarding tray icon issues on Linux.
In particular it's not possible to handle left clicks and to add tool tips.

Describe the solution you'd like

I would like to use the xdg standard for tray icons, which is supported on all Linux desktop environments and has many more features than libappindicator. Also libappindicator looks pretty dead. The last commit to the src folder is 15 years old.
https://bazaar.launchpad.net/~indicator-applet-developers/libappindicator/trunk/files

It looks to me like https://github.com/iovxw/ksni is a great fit for this task. It should be fairly easy to integrate it into Tauri.

I'm ready to write the necessary code myself. I just want to know if you are interested in merging it and if you would like to keep libappindicator as a choice, or if I can remove it.

Alternatives considered

No response

Additional context

No response

@FabianLars
Copy link
Member

Yes, this is desirable, see tauri-apps/tray-icon#107 and tauri-apps/tray-icon#104 for example.

It should be fairly easy to integrate it into Tauri.

Probably yeah, the only thing i'm not sure how to best approach is the inter-op with muda.

@dfaust
Copy link
Author

dfaust commented Oct 10, 2024

Ok, great. Sounds like you would like to remove libappindicator as well. I'll start working on it then.

@dfaust
Copy link
Author

dfaust commented Oct 20, 2024

@FabianLars: Integrating it with muda really is a pain. After a few iterations of shoehorning it in, I came up with the following changes. Please have a look at them. If you don't have any major concerns, I will update the docs and create the merge requests.

tauri-apps/tray-icon@dev...dfaust:tray-icon:ksni

tauri-apps/muda@dev...dfaust:muda:ksni

@FabianLars
Copy link
Member

Let me pull in @amrbashir the maintainer of the crates in question. I'll still try to take a look myself but i'm still out sick so idk when i can get to it.

@amrbashir
Copy link
Member

@dfaust thank you for the hard work, this looks very promising, please feel free to open the PRs and we will discuss the finer details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants