Changing the window corner icon in plasma

I recently decided to try out a terminal Spotify client instead of the official app. I’m new to linux, so I decided it’d be a fun challenge to try and make it, so I still have a spotify taskbar icon, like with a regular app that just launches a separate terminal, with a different class, so it’s more easily distinguishable. I wrote a script that copied the spotify icons from the appropriate /usr/share/icons/hicolor/ subdirectories to ~/.local/share/icons/hicolor/, so I could uninstall spotify, without losing the icons. I managed to get the taskbar icon to work:
Screenshot_20250527_170338

But the icon in the window corner is still the wayland logo:


I was curious what determines what exactly is displayed there? For reference, here is the .desktop file I made for this:

[Desktop Entry]
Categories=AudioVideo;Music;Player;
Comment=Terminal-based Spotify Client
Exec=ghostty --class=com.spotify.player --title=Spotify -e spotify_player
Icon=spotify-player
Name=Spotify
NoDisplay=false
StartupNotify=true
StartupWMClass=com.spotify.player
Terminal=false
Type=Application
WMClass=com.spotify.player
X-KDE-SubstituteUID=false

Hi! For what it’s worth - I don’t know the underlying logic, but a “quick fix” for that is possible using KWin Window Rules. Here’s an example of a rule I use for a similar situation with Calibre, where the Desktop file name is the name of the .desktop file, minus the .desktop part :slight_smile:

Using the “Detect Window Properties” button there can help identify what window class is actually present in the window you want to change, too.

1 Like


Thanks, that solved the issue!

1 Like