KDocker icon indicating copy to clipboard operation
KDocker copied to clipboard

Hide either original or KDocker icon in system tray?

Open dairefagan opened this issue 2 years ago • 2 comments

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:

image

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.

dairefagan avatar Jan 28 '23 19:01 dairefagan

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.

Daxx avatar Jun 19 '23 15:06 Daxx

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

  1. Right click expand/collapse system tray overflow icon => Configure System Tray...
  2. Click Entries
  3. Search for KDocker
  4. Set Visibility for all to Always hidden
Toggle to expand/collapse screenshot

kdocker-double-entries-work-around

The downside of this work around is that in the system tray overflow menu,
the double entries will still show

Rikj000 avatar Jul 07 '24 08:07 Rikj000

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.

user-none avatar Aug 23 '24 18:08 user-none