Skip to content

applets/systemtray: allow fully disabling app SNIs

Reason for the change

Some people don't like app-provided SNIs (Status Notifier Items, AKA "tray icons"), but some apps don't offer an option internally to disable their SNIs. This is annoying.

As such, offer the option to hide app-provided SNIs from the System Tray.

When the user does this, a message will be shown warning them that it's at their own risk since it could break the app.

Implementation-wise, the cleanest way I found was to save the list of disabled SNIs in a new config file key, rather than adding them to the existing extraItems key; extraItems was designed to only hold plasmoid IDs, and re-engineering it to accept SNI IDs as well ended up being much more complex and fragile.

Test plan

  1. Launch Discord or another annying app that doesn't allow disabling its tray icon in the app's own settings
  2. System tray arrow > settings button > the app in question > visibility: disabled

Restart plasmashell to make sure it worked

Do the same for the other visibility values.

Screenshots or screen recordings

disabled-sni-warning

Bugs fixed

FEATURE: 489239
FEATURE: 470798
FIXED-IN: 6.4.0

Merge request reports

Loading