How to Fix Faulty Spotify Icon in KDE Plasma Application Switch
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.
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
.
That's it already! Applying the changes should fix the icon.