I've created a Minecraft desktop entry, which works fine, but when I launch Minecraft it creates a new icon in my dock. I know that this isn't really an issue but I switched to elementary OS because I wanted to make everything look perfect. So, how could I fix it so that when I launch Minecraft through the launcher it doesn't create a new icon?
I figured out this has to do with the WMClass thanks to this post How to fix Netbeans 8.1 double icons on plank. But the issue now is that I can only have one
StartupWMClass=Minecraft 1.11.2 which won't change when minecraft updates and causes the launcher to create it's own icon. So I have to find a way to launch minecraft with a custom WMClass.
Update 2 - .desktop file:
[Desktop Entry] Name=Minecraft Comment=Play Minecraft Type=Application Exec=java -jar /home/will/.minecraft/launcher.jar Icon=/usr/share/applications/Minecraft.png Terminal=false Categories=Other; StartupWMClass=Minecraft 1.11.2