async def _setup_listeners(self):
        """
        Register a MatchRule to receive signals when interfaces are added
        and removed from the bus.
        """
        await add_signal_receiver(
            self._name_owner_changed,
            session_bus=True,
            signal_name="NameOwnerChanged",
            dbus_interface="org.freedesktop.DBus",
            use_bus=self.bus,
            preserve=True,
        )

        Register a MatchRule to receive signals when interfaces are added
        and removed from the bus.
        
libqtile/widget/helpers/status_notifier/statusnotifier.py