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

Dynamic icons #4

Merged
merged 2 commits into from
Dec 24, 2023
Merged

Dynamic icons #4

merged 2 commits into from
Dec 24, 2023

Conversation

hylophile
Copy link

@hylophile hylophile commented Sep 5, 2023

Hi!

This PR adds dynamically updating icons.

I also disabled caching for IconName as per https://dbus2.github.io/zbus/faq.html#why-arent-property-values-updating-for-my-service-that-doesnt-notify-changes, as otherwise some icons wouldn't update. Not sure if there's a better solution.

Little demo showing updates of nm-applet and mullvad-vpn:

eww.webm

@hylophile hylophile mentioned this pull request Sep 5, 2023
11 tasks
@Nemo157
Copy link

Nemo157 commented Sep 29, 2023

This doesn't appear to work with syncthingtray. I've verified via dfeet that the IconPixmap changes when it connects/disconnects, but I'm not sure how to check whether the signal is being sent.

this fixes dynamic icons for some icons, e.g. syncthingtray
@hylophile
Copy link
Author

hylophile commented Sep 29, 2023

@Nemo157 Just pushed a fix, syncthingtray should work now. (At least I was able to reproduce the problem and the latest commit fixed it.)

The fix is disabling caching for the IconPixmap property as well. Not sure what's different for mullvad-vpn, since it's also using IconPixmaps, but disabling zbus's cache seems to work.

@moetayuko
Copy link

this doesn't build after #3. created #5 to fix build

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

Successfully merging this pull request may close these issues.

4 participants