Skip to content

[Feature Request] Identify systray icons across session #247

@JonasWischeropp

Description

@JonasWischeropp

Describe the problem/motivation

I have implemented the following functionality that allows me to reorder system tray icons and decide which are always visible and which are collapsable.

20251120-1325-10.1906202.mp4

Currently, I am identifying the icons with their ID (SystrayIcon.id: string). The problem is that there are two types of IDs. Unique ones (with the structure XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX) and others that are defined with their window handle <window handle>:<id by program>. Due to being tied to the window handle, the latter don't allow a unique identification across different executions of the same program (e.g. closing steam and restarting it will assign it a different window handle).

Describe the solution you'd like

The identification problem could be solved by exposing the path to the program binary inside the SystrayIcon provider (e.g. processPath: string).
The combination of the executable path and uid from <hWnd>:<uid> should allow a unique identification in most cases.
The additional information might also be helpfully for other use cases.

Alternatives considered

Is there an alternative / better way?

I could create the required PR, if the addition of processPath: string is ok.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    📬 Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions