mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-10 07:42:09 -04:00
Add TrayRecoveryService singleton that re-registers lost tray icons after resume from suspend via a bash DBus scan. The service resolves every registered SNI item (both well-known names and :1.xxx connection IDs) to a canonical connection ID, building a unified REGISTERED_CONN_IDS set before either scan section runs. This prevents duplicates in both directions: - If an app registered via well-known name, the connection-ID section skips its :1.xxx entry. - If an app registered via connection ID, the well-known-name section skips its well-known name (checked through REGISTERED_CONN_IDS). - After successfully registering via well-known name, REGISTERED_CONN_IDS is updated immediately so the connection-ID section won't probe the same app in the same run. A single busctl snapshot (BUSCTL_OUT) is reused across both sections, replacing redundant dbus-send ListNames calls. The SNI Id dedup check inside the connection-ID subshells is now case-insensitive (-i flag) as a secondary fallback.