Ubuntu – How to disable 3rd party app tray icons/indicators in Ubuntu 18.10

gnome-shellindicatorsystem-tray

Would love to disable 3rd party app tray icons in Ubuntu 18.10, cause on HiDPi screen they look ugly – Screenshot

Heard that removing gnome-shell-extension-appindicator might take care of it, but it also wants to remove ubuntu-desktop* packages with it, so I wont even try it.

Tried also an extension called https://extensions.gnome.org/extension/351/icon-hider/ but it does not work as expected. It did hide the pointed app tray icon, but when you run the app again, another tray icon entry was created. I wont waste my time hiding new tray icons every time I launch an app.

I also don't want to install gnome vanilla. There must be a file/setting in the system somewhere that controls app indicators.

So any fix making app indicators disappear will be highly appreciated.

My system:

OS: Ubuntu 18.10 x86_64 
Kernel: 4.18.0-15-generic 
Shell: bash 4.4.19 
Resolution: 3840x2160 
DE: GNOME 3.30.1 
WM: GNOME Shell 
WM Theme: Adwaita 
Theme: Yaru [GTK2/3] 
Icons: Yaru [GTK2/3] 
Terminal: gnome-terminal 
CPU: Intel i7-6700K (8) @ 4.300GHz 
GPU: NVIDIA GeForce GTX 1080 
Memory: 2790MiB / 32101MiB

Best Answer

I'm happy to share a solution to this problem.
File responsible for app indicators is /usr/share/gnome-shell/extensions/ubuntu-appindicators@ubuntu.com/appIndicator.js
So, simply make a backup of it - appIndicator.js.BAK = no more ugly indicators.
And don't forget to restart the machine/session for changes to take effect ;)
The only downside of disabling it will be up to you to configure your apps to not show the tray icons and not interact with it.
And a proof... enter image description here