DEV Community

Cover image for How to Fix Faulty Spotify Icon in KDE Plasma Application Switch
Kai
Kai

Posted on

How to Fix Faulty Spotify Icon in KDE Plasma Application Switch

Cover image description

A screenshot showing an application switch with three open apps: system settings, Spotify and Firefox. The icon of the Spotify entry is highlighted and clearly wrong. Only the label "Spotify" gives away, that it's actually the app. The icon is the X11 fallback icon.

Applying a KWin Rule

Whether I installed the app image or the Flatpack version of Spotify, I always had issues with the app icon in the window's title bar and the application switch. It fell back to a defaulting x11 icon.
A screenshot showing an application switch with three open apps: system settings, Spotify and Firefox. The icon of the Spotify entry is highlighted and clearly wrong. Only the label "Spotify" gives away, that it's actually the app. The icon is the X11 fallback icon.
A screenshot showing the title bar of Spotify. The title bar features a clearly wrong icon. It's the icon of X11.
After investigating, it turned out that it's relatively easy to fix. All you need is a simple KWin rule. You don't even need to set any properties with it (at least, I have observed so far). It just needs to be there. For the sake of "better safe than sorry", we add a meaningful property anyway.
Open up "Window Rules" in the "System Settings". Add a new rule and give it a meaningful description. Something like "Spotify" should do the trick. Then add spotify (lowercase is essential!) as the Window Class. Afterward, click "Add Property" and choose "Desktop file name". Add spotify-client as the value and select the mode Force.
A screenshot showing the "Window Rules" dialog with the settings as described in the paragraph above.
That's it already! Applying the changes should fix the icon.
A screenshot showing the title bar of Spotify and an application switch. Both icons are now correctly displaying the official Spotify app image.

Top comments (0)