Repository: qtile/qtile

Issue:
Apps in Status.notifier widget not able to update their icon dynamically.
### The issue:

qtile-git
qtile-extra-git.

Some apps working with status.notifier like nm-applet should be able to have their icons changed dynamically as with systray.
But at the moment this is not working
A good example to test is nm-applet with changing from ethernet to wifi or connecting vpn.

Run of a dbus-monitor "type='signal'" while changing network with nm-applet. Here's the log:
<details><p>

## debug 
---

```
dbus-monitor "type='signal'"
signal time=1667385368.582081 sender=org.freedesktop.DBus -> destination=:1.56 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.56"
signal time=1667385368.582126 sender=org.freedesktop.DBus -> destination=:1.56 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string ":1.56"
signal time=1667385375.791646 sender=:1.13 -> destination=(null destination) serial=30 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=ItemsPropertiesUpdated
   array [
      struct {
         int32 19
         array [
            dict entry(
               string "toggle-state"
               variant                   int32 1
            )
         ]
      }
   ]
   array [
   ]
signal time=1667385375.795360 sender=:1.13 -> destination=(null destination) serial=31 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385375.798614 sender=:1.13 -> destination=(null destination) serial=32 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=LayoutUpdated
   uint32 78
   int32 0
signal time=1667385375.798622 sender=:1.13 -> destination=(null destination) serial=33 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=ItemsPropertiesUpdated
   array [
      struct {
         int32 0
         array [
            dict entry(
               string "children-display"
               variant                   string "submenu"
            )
         ]
      }
   ]
   array [
   ]
signal time=1667385375.804222 sender=:1.13 -> destination=(null destination) serial=34 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385375.804228 sender=:1.13 -> destination=(null destination) serial=35 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385375.807739 sender=:1.13 -> destination=(null destination) serial=36 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=LayoutUpdated
   uint32 126
   int32 0
signal time=1667385375.807762 sender=:1.13 -> destination=(null destination) serial=37 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=ItemsPropertiesUpdated
   array [
      struct {
         int32 0
         array [
            dict entry(
               string "children-display"
               variant                   string "submenu"
            )
         ]
      }
   ]
   array [
   ]
signal time=1667385375.826363 sender=org.freedesktop.DBus -> destination=(null destination) serial=80 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.57"
   string ""
   string ":1.57"
signal time=1667385375.826374 sender=org.freedesktop.DBus -> destination=:1.57 serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.57"
signal time=1667385375.836104 sender=org.freedesktop.DBus -> destination=:1.57 serial=6 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string ":1.57"
signal time=1667385375.836111 sender=org.freedesktop.DBus -> destination=(null destination) serial=81 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.57"
   string ":1.57"
   string ""
signal time=1667385375.838280 sender=:1.13 -> destination=(null destination) serial=46 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385375.838286 sender=:1.13 -> destination=(null destination) serial=47 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385375.839670 sender=:1.0 -> destination=(null destination) serial=14 path=/org/freedesktop/secrets/collection/login; interface=org.freedesktop.Secret.Collection; member=ItemDeleted
   object path "/org/freedesktop/secrets/collection/login/258"
signal time=1667385375.839783 sender=:1.0 -> destination=(null destination) serial=16 path=/org/freedesktop/secrets/collection/login; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
   string "org.freedesktop.Secret.Collection"
   array [
      dict entry(
         string "Items"
         variant             array [
               object path "/org/freedesktop/secrets/collection/login/12"
               object path "/org/freedesktop/secrets/collection/login/170"
               object path "/org/freedesktop/secrets/collection/login/2"
               object path "/org/freedesktop/secrets/collection/login/11"
               object path "/org/freedesktop/secrets/collection/login/177"
               object path "/org/freedesktop/secrets/collection/login/1"
               object path "/org/freedesktop/secrets/collection/login/229"
               object path "/org/freedesktop/secrets/collection/login/218"
               object path "/org/freedesktop/secrets/collection/login/255"
               object path "/org/freedesktop/secrets/collection/login/17"
               object path "/org/freedesktop/secrets/collection/login/253"
            ]
      )
   ]
   array [
   ]
signal time=1667385375.842749 sender=:1.13 -> destination=(null destination) serial=49 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=LayoutUpdated
   uint32 174
   int32 0
signal time=1667385375.842862 sender=:1.13 -> destination=(null destination) serial=50 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=ItemsPropertiesUpdated
   array [
      struct {
         int32 0
         array [
            dict entry(
               string "children-display"
               variant                   string "submenu"
            )
         ]
      }
   ]
   array [
   ]
signal time=1667385375.849500 sender=:1.0 -> destination=(null destination) serial=18 path=/org/freedesktop/secrets/collection/login; interface=org.freedesktop.Secret.Collection; member=ItemCreated
   object path "/org/freedesktop/secrets/collection/login/259"
signal time=1667385375.849583 sender=:1.0 -> destination=(null destination) serial=20 path=/org/freedesktop/secrets/collection/login; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
   string "org.freedesktop.Secret.Collection"
   array [
      dict entry(
         string "Items"
         variant             array [
               object path "/org/freedesktop/secrets/collection/login/12"
               object path "/org/freedesktop/secrets/collection/login/170"
               object path "/org/freedesktop/secrets/collection/login/2"
               object path "/org/freedesktop/secrets/collection/login/11"
               object path "/org/freedesktop/secrets/collection/login/177"
               object path "/org/freedesktop/secrets/collection/login/1"
               object path "/org/freedesktop/secrets/collection/login/229"
               object path "/org/freedesktop/secrets/collection/login/218"
               object path "/org/freedesktop/secrets/collection/login/255"
               object path "/org/freedesktop/secrets/collection/login/17"
               object path "/org/freedesktop/secrets/collection/login/259"
               object path "/org/freedesktop/secrets/collection/login/253"
            ]
      )
   ]
   array [
   ]
signal time=1667385375.891944 sender=:1.13 -> destination=(null destination) serial=52 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385375.891955 sender=:1.13 -> destination=(null destination) serial=53 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385375.992581 sender=:1.13 -> destination=(null destination) serial=54 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385375.992615 sender=:1.13 -> destination=(null destination) serial=55 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.092754 sender=:1.13 -> destination=(null destination) serial=56 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.092772 sender=:1.13 -> destination=(null destination) serial=57 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.193339 sender=:1.13 -> destination=(null destination) serial=58 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.193373 sender=:1.13 -> destination=(null destination) serial=59 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.293663 sender=:1.13 -> destination=(null destination) serial=60 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.293690 sender=:1.13 -> destination=(null destination) serial=61 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.394219 sender=:1.13 -> destination=(null destination) serial=62 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.394254 sender=:1.13 -> destination=(null destination) serial=63 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.494665 sender=:1.13 -> destination=(null destination) serial=64 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.494702 sender=:1.13 -> destination=(null destination) serial=65 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.595207 sender=:1.13 -> destination=(null destination) serial=66 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.595242 sender=:1.13 -> destination=(null destination) serial=67 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.695672 sender=:1.13 -> destination=(null destination) serial=68 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.695713 sender=:1.13 -> destination=(null destination) serial=69 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.796126 sender=:1.13 -> destination=(null destination) serial=70 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.796159 sender=:1.13 -> destination=(null destination) serial=71 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.896627 sender=:1.13 -> destination=(null destination) serial=72 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.896661 sender=:1.13 -> destination=(null destination) serial=73 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.997115 sender=:1.13 -> destination=(null destination) serial=74 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385376.997146 sender=:1.13 -> destination=(null destination) serial=75 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.097156 sender=:1.13 -> destination=(null destination) serial=76 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.097167 sender=:1.13 -> destination=(null destination) serial=77 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.197854 sender=:1.13 -> destination=(null destination) serial=78 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.197887 sender=:1.13 -> destination=(null destination) serial=79 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.298336 sender=:1.13 -> destination=(null destination) serial=80 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.298368 sender=:1.13 -> destination=(null destination) serial=81 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.398840 sender=:1.13 -> destination=(null destination) serial=82 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.398872 sender=:1.13 -> destination=(null destination) serial=83 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.499276 sender=:1.13 -> destination=(null destination) serial=84 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.499307 sender=:1.13 -> destination=(null destination) serial=85 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.599749 sender=:1.13 -> destination=(null destination) serial=86 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.599781 sender=:1.13 -> destination=(null destination) serial=87 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.700212 sender=:1.13 -> destination=(null destination) serial=88 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.700245 sender=:1.13 -> destination=(null destination) serial=89 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.800660 sender=:1.13 -> destination=(null destination) serial=90 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.800692 sender=:1.13 -> destination=(null destination) serial=91 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.901119 sender=:1.13 -> destination=(null destination) serial=92 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385377.901152 sender=:1.13 -> destination=(null destination) serial=93 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.001530 sender=:1.13 -> destination=(null destination) serial=94 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.001563 sender=:1.13 -> destination=(null destination) serial=95 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.101990 sender=:1.13 -> destination=(null destination) serial=96 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.102024 sender=:1.13 -> destination=(null destination) serial=97 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.202516 sender=:1.13 -> destination=(null destination) serial=98 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.202548 sender=:1.13 -> destination=(null destination) serial=99 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.302707 sender=:1.13 -> destination=(null destination) serial=100 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.302728 sender=:1.13 -> destination=(null destination) serial=101 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.403317 sender=:1.13 -> destination=(null destination) serial=102 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.403349 sender=:1.13 -> destination=(null destination) serial=103 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.503724 sender=:1.13 -> destination=(null destination) serial=104 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.503757 sender=:1.13 -> destination=(null destination) serial=105 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.604181 sender=:1.13 -> destination=(null destination) serial=106 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.604212 sender=:1.13 -> destination=(null destination) serial=107 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.704657 sender=:1.13 -> destination=(null destination) serial=108 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.704690 sender=:1.13 -> destination=(null destination) serial=109 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.805115 sender=:1.13 -> destination=(null destination) serial=110 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.805146 sender=:1.13 -> destination=(null destination) serial=111 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.905530 sender=:1.13 -> destination=(null destination) serial=112 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385378.905563 sender=:1.13 -> destination=(null destination) serial=113 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.005973 sender=:1.13 -> destination=(null destination) serial=114 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.006005 sender=:1.13 -> destination=(null destination) serial=115 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.106201 sender=:1.13 -> destination=(null destination) serial=116 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.106218 sender=:1.13 -> destination=(null destination) serial=117 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.170730 sender=:1.13 -> destination=(null destination) serial=118 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.170752 sender=:1.13 -> destination=(null destination) serial=119 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.174162 sender=:1.13 -> destination=(null destination) serial=120 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=LayoutUpdated
   uint32 222
   int32 0
signal time=1667385379.174169 sender=:1.13 -> destination=(null destination) serial=121 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=ItemsPropertiesUpdated
   array [
      struct {
         int32 0
         array [
            dict entry(
               string "children-display"
               variant                   string "submenu"
            )
         ]
      }
   ]
   array [
   ]
signal time=1667385379.176820 sender=:1.13 -> destination=(null destination) serial=122 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.176828 sender=:1.13 -> destination=(null destination) serial=123 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.180889 sender=:1.13 -> destination=(null destination) serial=124 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=LayoutUpdated
   uint32 270
   int32 0
signal time=1667385379.180901 sender=:1.13 -> destination=(null destination) serial=125 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=ItemsPropertiesUpdated
   array [
      struct {
         int32 0
         array [
            dict entry(
               string "children-display"
               variant                   string "submenu"
            )
         ]
      }
   ]
   array [
   ]
signal time=1667385379.180924 sender=:1.13 -> destination=(null destination) serial=126 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.180936 sender=:1.13 -> destination=(null destination) serial=127 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.184725 sender=:1.13 -> destination=(null destination) serial=128 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=LayoutUpdated
   uint32 318
   int32 0
signal time=1667385379.184754 sender=:1.13 -> destination=(null destination) serial=129 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=ItemsPropertiesUpdated
   array [
      struct {
         int32 0
         array [
            dict entry(
               string "children-display"
               variant                   string "submenu"
            )
         ]
      }
   ]
   array [
   ]
signal time=1667385379.184788 sender=:1.13 -> destination=(null destination) serial=130 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.184798 sender=:1.13 -> destination=(null destination) serial=131 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.188390 sender=:1.13 -> destination=(null destination) serial=132 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=LayoutUpdated
   uint32 366
   int32 0
signal time=1667385379.188469 sender=:1.13 -> destination=(null destination) serial=133 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=ItemsPropertiesUpdated
   array [
      struct {
         int32 0
         array [
            dict entry(
               string "children-display"
               variant                   string "submenu"
            )
         ]
      }
   ]
   array [
   ]
signal time=1667385379.188494 sender=:1.13 -> destination=(null destination) serial=134 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.188498 sender=:1.13 -> destination=(null destination) serial=135 path=/org/ayatana/NotificationItem/nm_applet; interface=org.kde.StatusNotifierItem; member=NewIcon
signal time=1667385379.191872 sender=:1.13 -> destination=(null destination) serial=136 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=LayoutUpdated
   uint32 414
   int32 0
signal time=1667385379.191879 sender=:1.13 -> destination=(null destination) serial=137 path=/org/ayatana/NotificationItem/nm_applet/Menu; interface=com.canonical.dbusmenu; member=ItemsPropertiesUpdated
   array [
      struct {
         int32 0
         array [
            dict entry(
               string "children-display"
               variant                   string "submenu"
            )
         ]
      }
   ]
   array [
   ]
^C

~ took 18s 

```
---
</p></details>

### Required:

- [X] I have searched past issues to see if this bug has already been reported.


Discussion:

Resolving patch:
diff --git a/libqtile/widget/statusnotifier.py b/libqtile/widget/statusnotifier.py
--- a/libqtile/widget/statusnotifier.py
+++ b/libqtile/widget/statusnotifier.py
@@ -139,21 +139,13 @@ async def start(self):
             logger.warning("Unable to find StatusNotifierItem interface on %s", self.service)
             return False
 
-        # Default to XDG icon:
-        icon_name = await self.item.get_icon_name()
-
-        try:
-            icon_path = await self.item.get_icon_theme_path()
-            self.icon = self._get_custom_icon(icon_name, icon_path)
-        except (AttributeError, DBusError):
-            pass
-
-        if not self.icon:
-            self.icon = self._get_xdg_icon(icon_name)
+        await self._get_local_icon()
 
         # If there's no XDG icon, try to use icon provided by application
-        if self.icon is None:
+        if self.icon:
+            self.item.on_new_icon(self._update_local_icon)
 
+        else:
             # Get initial application icons:
             for icon in ["Icon", "Attention", "Overlay"]:
                 await self._get_icon(icon)
@@ -171,6 +163,24 @@ async def start(self):
 
         return True
 
+    async def _get_local_icon(self):
+        # Default to XDG icon:
+        icon_name = await self.item.get_icon_name()
+
+        try:
+            icon_path = await self.item.get_icon_theme_path()
+            self.icon = self._get_custom_icon(icon_name, icon_path)
+        except (AttributeError, DBusError):
+            pass
+
+        if not self.icon:
+            self.icon = self._get_xdg_icon(icon_name)
+
+    def _update_local_icon(self):
+        self.icon = None
+        task = asyncio.create_task(self._get_local_icon())
+        task.add_done_callback(self._redraw)
+
     def _new_icon(self):
         task = asyncio.create_task(self._get_icon("Icon"))
         task.add_done_callback(self._redraw)


Test patch: