applets/systemtray: Disambiguate Electron/Chromium tray icons
Summary
All Electron/Chromium-based apps register their system tray icons using the same SNI Id (chrome_status_icon_1). This causes per-app visibility settings (Shown/Hidden/Auto) to be shared — changing one app affects all others.
This MR resolves each SNI item's owning process via D-Bus PID lookup and parses /proc/PID/cmdline to extract the actual app name, then appends it to the config key for disambiguation.
How it works
- Apps with their own binary (1Password, Feishin):
/proc/PID/commalready returns a unique name - Apps using system Electron (Element, Vesktop, Bitwarden):
/proc/PID/commreturnselectronfor all. Instead, the.asarpath from cmdline is parsed (/usr/lib/vesktop/app.asar→vesktop)
Config key example: chrome_status_icon_1@vesktop
Resolved bugs
This fixes Bug 470840 (previously closed as RESOLVED UPSTREAM) and its 9 duplicates:
While Electron addressed this upstream in v40+, many apps still use older Electron versions. This KDE-side fix works regardless of the Electron version.
Test plan
- Launch multiple Electron apps (Element, Vesktop, Bitwarden, 1Password, Feishin)
- Open System Tray Settings → Entries
- Each app appears as a separate entry
- Changing visibility of one app does not affect others
- Settings persist after reboot
Edited by Nekto Oleg
