AyatanaIndicators/libayatana-appindicator

Introduce back python bindings (for python 3)

Closed this issue · 3 comments

Hello,

It seems that python bindings are not provided anymore.
Libappindicator is deprecated and a lot of tools written in python still rely on tray icons.

Could you please provide python bindings with a few examples ?

Python 2 bindings were removed, but Python 3 works fine: https://lazka.github.io/pgi-docs/#AyatanaAppIndicator3-0.1/classes/Indicator.html

As for examples, the API is the same as AyatanaAppIndicator3. You can do something similar to this to support both: https://github.com/nicotine-plus/nicotine-plus/blob/1ef25abbcca8e18a2f1f624f777896e4d59f689f/pynicotine/gtkgui/widgets/trayicon.py#L273-L287

@mathiascode Thanks for the reference. Here is simple example of switching from AppIndicator3 to supporting both libraries:

https://codeberg.org/WhyNotHugo/caffeine-ng/commit/d13b2b97160649b465213e691a8df2e958ecf739

Thanks you mathias, I was looking for the binding generation in this repository, hence the confusion.