1

I have a script that launches a number of Google Chrome windows through wmctrl. I created a launcher for that script and assigned a different icon to it. Problem is, every time Google Chrome is launched in this way, in window switcher (Alt+Tab) it is assigned the icon of the launcher, not its native one.

Is there a way to set the native Google Chrome icon (or, if we generalize - to keep a native icon of an opened application) when launching it through a script?

1 Answer 1

2

Use StartupWMClass in a reversed way

Normally, you can make sure a window is connected to a specific launcher (icon) by adding a line (e.g.) StartupWMClass=Google-chrome-stable to the .desktop file.

To prevent a window from being connected to an icon, the opposite can be done as well: add a line to your custom (script-) launcher:

StartupWMClass=Banana

To make sure the window, called by the launcher is not attached to the launcher, since Banana is a none-sense StartupWMClass. It will then be connected to its own icon again.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .