Add the number of pending updates to the systray applet
Depending on how hard it is to handle, having the systray applet showing the number of pending updates (such as what the Arch Updates Indicator Gnome extension is doing) would be a nice plus!
Retrieving this information from the main script and adding it to the current_state file (for instance) would be trivial. However, the integration of that information within the systray applet itself needs to be studied.
@trigg Do you mind if I assign you on that issue as well?
No urgency at all though. At this point this is more of a study than an actual feature request. Actually, if we do not manage to find a simple and elegant way to handle this, I'd rather drop it than making the code unnecessarily more complex just for that. The number of pending updates is already reported in the desktop notification to be fair.
From what I'm seeing the only route to doing this would be to load the icon, and draw into it before sending the altered buffer over dbus.
From what I'm reading there's no promise any particular panel will accept raw-buffer icons.
By all means assign me, I can do some mock ups when I'm available next
Uh, ok. Thanks for the research. We'll see how it goes, but once again, if it is too complicated/hacky/whatever, let's not wrap our head too hard on this :)
I assigned you, thanks!
So I finally took the time to study this and it indeed seems like there's no builtin / easy way to achieve this directly with the PyQt6 QSystemTrayIcon Python library. I definitely don't feel comfortable enough with Python to make something on my own for this or complicating the script with such mechanism described there.
However, I found the tooltip class which allows to display string chains when you hover your mouse over the icon and was able to make it show the number of pending updates (and even the actual list of pending updates as a bonus :smile:):
This is not exactly what I had in mind when opening this issue (as you would still need to hover your mouse on the systray icon to get the info) but I'll go with this, ~~for lack of anything better~~. <-- after a good night sleep, I actually like this solution better I think. It feels like a good use for a tooltip, allowing to show much more info.