Custom task manager icons in KDE
2025-05-20
I recently got very annoyed that different VSCodium instances can't be distinguished based on their icon in the task manager. How am I supposed to know which icon corresponds to which project? To make matters worse, the upstream feature request was denied.
After some searching, I found a useful suggestion in the KDE community forum.
First, you need to create a copy of the application's .desktop
file and save it in ~/.local/share/appplications
with a descriptive name.
For VSCodium this may look as follows:
[Desktop Entry]
Actions=new-empty-window
Categories=Utility;TextEditor;Development;IDE
Comment=Code Editing. Redefined.
Exec=codium %F
GenericName=Text Editor
Icon=nix-snowflake
Keywords=vscode
Name=VSCodium
StartupNotify=true
StartupWMClass=vscodium
Type=Application
Version=1.4
[Desktop Action new-empty-window]
Exec=codium --new-window %F
Icon=vscodium
Name=New Empty Window
You can put in your desired Icon=
directly, or use Dolphin's editor for desktop files.
Finally, you also need to create a KWin rule to override the desktop file used for each VSCodium instance.
Modify the window title match based on your project directory, and use the name of your just created .desktop
file in as the desktop file name.
It is also possible to append the rule to ~/.config/kwinrulesrc
directly.
[a6ca5805-a1dc-4318-af50-9a8f604e9f84]
Description=codium icon: project-name
desktopfile=codium-project-name
desktopfilerule=2
title=- project-name -
titlematch=2
wmclass=codium codium
wmclasscomplete=true
wmclassmatch=1