KDocker
KDocker copied to clipboard
Hide either original or KDocker icon in system tray?
Ubuntu 22.04.1 LTS Gnome 42.5 KDocker 5.3
I autostart Proton VPN with the command kdocker -t -d 15 -n Protonvpn protonvpn as there is no built-in minimise parameter. This results in 2 icons on my top panel:

Can you please tell me if it is possible to remove one of them? Preference to either keep the original or make the same click-menu options accessible from the KDocker icon.
After starting it without kdocker, it might help to see the output from :
xwininfo -root -children | grep [Pp]rotonvpn
- and -
wmctrl -l | grep "[Pp]rotonvpn"
More detail about each window can be found with xwininfo -id 0x??????? # (From either command above)
Of course, the chosen window can be docked using the same id kdocker -w 0x???????
If that gives a better result, I would write a shell script that starts protonvpn, then wrangles the window id, then docks the window. If your output looks good enough, I might be motivated to help with that, if needed.
I tried with pidof to get the process ID,
and then kdocker -x <process id>,
which sadly also leads to a double icon in the tray.
This of course only applies to programs which already have their own tray implementation
(e.g. virt-manager, fdm, yubico-authenticator)
I hoped to use kdocker to automatically minimize these to the tray.
Suggestion
Implement a new command flag to only "close" (minimize to tray) without starting a new kdocker tray entry.
Work around
- Right click expand/collapse system tray overflow icon => Configure System Tray...
- Click Entries
- Search for
KDocker - Set Visibility for all to
Always hidden
Toggle to expand/collapse screenshot
The downside of this work around is that in the system tray overflow menu,
the double entries will still show
Implement a new command flag to only "close" (minimize to tray) without starting a new kdocker tray entry.
The purpose of KDocker is to dock applications to the system tray. It's a solution to hiding windows. If they already have a tray icon then KDocke either isn't the right solution or you need to disable the application's tray icon if it allows that.