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

Add the number of pending updates to the systray applet #154

Closed
Antiz96 opened this issue May 10, 2024 · 4 comments · Fixed by #257
Closed

Add the number of pending updates to the systray applet #154

Antiz96 opened this issue May 10, 2024 · 4 comments · Fixed by #257
Assignees
Labels
feature/request New feature or request help wanted Extra attention is needed
Milestone

Comments

@Antiz96
Copy link
Owner

Antiz96 commented May 10, 2024

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 a state file (for the systray applet to get the number from) would be trivial. However, the integration of that information within the systray applet itself needs to be studied.

@Antiz96 Antiz96 added feature/request New feature or request question/feedback General question/feedback labels May 10, 2024
@Antiz96 Antiz96 self-assigned this May 10, 2024
@Antiz96
Copy link
Owner Author

Antiz96 commented May 10, 2024

@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.

@trigg
Copy link
Contributor

trigg commented May 10, 2024

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

@Antiz96
Copy link
Owner Author

Antiz96 commented May 10, 2024

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!

@Antiz96 Antiz96 added the help wanted Extra attention is needed label Jun 17, 2024
@Antiz96 Antiz96 removed the question/feedback General question/feedback label Jul 2, 2024
@Antiz96 Antiz96 changed the title Add the number of pending updates in the systray applet Add the number of pending updates to the systray applet Aug 1, 2024
@Antiz96
Copy link
Owner Author

Antiz96 commented Sep 30, 2024

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 😄):

2024-09-30_23-20

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.

@Antiz96 Antiz96 added this to the 3.2.0 milestone Oct 1, 2024
Antiz96 added a commit that referenced this issue Oct 1, 2024
…oltip

Show the number and the list of pending updates in the systray applet's tooltip, shown when hovering the mouse over the systray icon.

Closes #154
Antiz96 added a commit that referenced this issue Oct 1, 2024
…oltip

Show the number and the list of pending updates in the systray applet's tooltip, shown when hovering the mouse over the systray icon.

Closes #154
Antiz96 added a commit that referenced this issue Oct 1, 2024
…oltip

Show the number and the list of pending updates in the systray applet's tooltip, shown when hovering the mouse over the systray icon.

Closes #154
Antiz96 added a commit that referenced this issue Oct 1, 2024
…oltip

Show the number and the list of pending updates in the systray applet's tooltip, shown when hovering the mouse over the systray icon.

Closes #154
Antiz96 added a commit that referenced this issue Oct 1, 2024
…oltip

Show the number and the list of pending updates in the systray applet tooltip, shown when hovering the mouse over the systray icon.

Closes #154
Antiz96 added a commit that referenced this issue Oct 1, 2024
…oltip

Show the number and the list of pending updates in the systray applet tooltip, shown when hovering the mouse over the systray icon.

Closes #154
Antiz96 added a commit that referenced this issue Oct 1, 2024
…oltip

Show the number and the list of pending updates in the systray applet tooltip, shown when hovering the mouse over the systray icon.

Closes #154
Antiz96 added a commit that referenced this issue Oct 1, 2024
…oltip

Show the number and the list of pending updates in the systray applet tooltip, shown when hovering the mouse over the systray icon.

Closes #154
Antiz96 added a commit that referenced this issue Oct 1, 2024
…oltip (#257)

Show the number and the list of pending updates in the systray applet tooltip, shown when hovering the mouse over the systray icon.

Closes #154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/request New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants