How to set up a global keyboard shortcut to toggle applications minimised in the system tray?


Aside from my dissapointing discovery when I checked the system tray settings, I found out that KDE has Custom Shortcuts. So, naturally I figured that I want to use a global shortcut from the Custom Shortcuts settings to solve this problem.

Trigger: <Meta>+<F5>
Command: keepassxc

However, as you might have guessed, this command launches the application KeePassXC. NOT to toggle applications minimised in the system tray. This shortcut can be thought of as “Focus KeePassXC” by relying on the fact that KeePassXC has a “single instance only” option.

So, the problem? That Custom Shortcut is a hack, a terrible one too. What if there’s an application that doesn’t have a “single instance only” option? Hence, that’s why I’m reaching out for help.