Bug 489239 - Option to fully disable app-provided tray icons
Summary: Option to fully disable app-provided tray icons
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (other bugs)
Version First Reported In: 6.1.0
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 497665 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-26 13:53 UTC by cwupfch1
Modified: 2025-03-14 14:52 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.4.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cwupfch1 2024-06-26 13:53:07 UTC
Add ability to set any tray as "disabled".
Comment 1 Nate Graham 2024-06-26 16:30:41 UTC
Which icons are you unable to set to disabled that you would like to disable? Please explain the issue rather than proposing a solution.
Comment 2 Bug Janitor Service 2024-07-11 03:47:13 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 cwupfch1 2024-07-11 14:22:15 UTC
(In reply to Nate Graham from comment #1)
> Which icons are you unable to set to disabled that you would like to
> disable? Please explain the issue rather than proposing a solution.
I can't set applications tray icons as disabled
https://imgur.com/a/tksBVSH
Comment 4 cwupfch1 2024-07-11 14:28:25 UTC
(In reply to Nate Graham from comment #1)
> Which icons are you unable to set to disabled that you would like to
> disable? Please explain the issue rather than proposing a solution.
I can't set applications tray icons as disabled
https://imgur.com/a/tksBVSH
Comment 5 Nate Graham 2024-07-14 03:13:23 UTC
Aha, I see it now.

So we don't offer a "disabled" option for tray icons that come from apps because we can't know whether the apps would be broken by you disabling their system tray icons. Some apps might display *only* a tray icon as a visible UI, and if it was gone, you'd have no UGI method of determining if it was running.

Perhaps we could warn you about this though, and tell you that hiding apps' tray icons is done at your own risk. Because, yeah, it's really annoying when you have an app that doesn't offer an internal method to disable its tray icon.
Comment 6 John Kizer 2024-12-18 23:56:04 UTC
*** Bug 497665 has been marked as a duplicate of this bug. ***
Comment 7 arthur.caccavo 2024-12-19 00:15:04 UTC
> So we don't offer a "disabled" option for tray icons that come from apps
> because we can't know whether the apps would be broken by you disabling
> their system tray icons. Some apps might display *only* a tray icon as a
> visible UI, and if it was gone, you'd have no UGI method of determining if
> it was running.
> 
> Perhaps we could warn you about this though, and tell you that hiding apps'
> tray icons is done at your own risk. Because, yeah, it's really annoying
> when you have an app that doesn't offer an internal method to disable its
> tray icon.

Thanks for the perscpective! I was sure there was a reason I couldn't find it anywhere.

If you permit my two cents, my use case for this bug is a little more specific. I have multiple screens with multiple instances of the system tray widget. It would be nice to be able to set it disabled on one off them and while keeping enabled on the other. Maybe the option could confirm that there is at least an instance of system tray where the icon is present and prevent the removal (or message about the problem) only in the last one. I have no idea on the work it presents but this is my perspective as an user, hope it helps.
Comment 8 Nate Graham 2024-12-19 17:35:47 UTC
We could make a "Disable" option for app-provided tray icons simply hide it on the tray widget being configured, yeah.
Comment 9 Thomas Vde 2025-02-12 11:18:34 UTC
Yes, please!
I am also all for this "Disable"-Option! ... to de-clutter the menu from icons of third party apps.
Comment 10 Thomas Vde 2025-02-12 11:23:21 UTC
If the user realizes, that this icon was his only way to interact with the app ... he can always go back and enable it again. ... 

The only necessary warning would IMO be: "If you disable this entry, you might not be able to interact with the app. In this case just re-enable it!"
Comment 11 Bug Janitor Service 2025-03-03 00:30:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5283
Comment 12 Thomas Vde 2025-03-03 08:20:38 UTC
(In reply to Bug Janitor Service from comment #11)
> A possibly relevant merge request was started @
> https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5283

Oh, Nate Graham, this is so beautiful! ... Thank you very much! .. :-)
Comment 13 Nate Graham 2025-03-03 14:40:01 UTC
You're very welcome! It's something I've wanted for years.
Comment 14 Nate Graham 2025-03-14 14:52:10 UTC
Git commit 13a2b93ec46bc529e5f95cadd58e2b359626dcd3 by Nate Graham.
Committed on 14/03/2025 at 14:42.
Pushed by ngraham into branch 'master'.

applets/systemtray: allow fully disabling app SNIs

Some people don't like app-provided SNIs, but some apps don't offer an
option internally to disable their SNI. 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.
Related: bug 470798
FIXED-IN: 6.4.0

M  +4    -0    applets/systemtray/package/contents/config/main.xml
M  +55   -20   applets/systemtray/package/contents/ui/ConfigEntries.qml
M  +2    -1    applets/systemtray/systemtraymodel.cpp
M  +7    -0    applets/systemtray/systemtraysettings.cpp
M  +3    -0    applets/systemtray/systemtraysettings.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/13a2b93ec46bc529e5f95cadd58e2b359626dcd3