BlueManCZ / SIF

:video_game: Steam Icons Fixer - Fix runtime icons of Steam games on Linux.
Apache License 2.0
53 stars 4 forks source link

[Database Request] Half-Life 2 #10

Closed Remyrios closed 4 years ago

Remyrios commented 4 years ago

Also Half-Life 2: Lost Coast, Half-Life 2: Episode One and Half-Life 2: Episode Two

It seems like HL2 is already in the database but the icon doesn't match the icon I've seen in the Papirus icon theme.

APP_ID: 220, 340, 380, 420 WM_CLASS: hl2_linux WM_NAME: HALF-LIFE 2 - OpenGL Icon Theme: Papirus-Dark

BlueManCZ commented 4 years ago

This is strange. I understand the DLCs are not in the database, but Half-Life 2 itself should work. It does for me. What icon do you see?

Snímek z 2020-10-24 22-44-07

Remyrios commented 4 years ago

This is the icon I see: image

BlueManCZ commented 4 years ago

And when you apply the fix, you see Half-Life 2 was fixed?

Remyrios commented 4 years ago

The script says it applies the icon, I can see some added launch parameters but the icon doesn't change

Remyrios commented 4 years ago

Okay, found the issue and I think I know its cause. It happens to all the games that have to get additional launch parameters. And the cause of them not working for me might be my shell which is not POSIX compliant (fish).

BlueManCZ commented 4 years ago

Alright, this can be a problem. Can you confirm it works with any different shell?

Remyrios commented 4 years ago

Okay so changing the shell to zsh did not fix the problem

BlueManCZ commented 4 years ago

I kind of don't know how to debug it, but did you restart Steam after changing the shell?

Remyrios commented 4 years ago

I had to end the session to fully change the shell so yeah I did

BlueManCZ commented 4 years ago

Ok, what do you get when you perform xprop WM_CLASS on the "fixed" Half-Life 2?

Remyrios commented 4 years ago

Huh, HALF-LIFE 2 - OpenGL, that's weird

BlueManCZ commented 4 years ago

So the fix does kind of work. The another thing that came to my mind is what panel or dock you use?

Remyrios commented 4 years ago

I use Latte-Dock (KDE Plasma)

BlueManCZ commented 4 years ago

The thing is that games without specific WM_CLASS are more complicated to fix.

Right now I do it by running fix-wm-class.sh script from the game launch parameters, as you may have noticed. It changes runtime WM_CLASS of the game window. This means the icon is de-facto changed in a short time after the game is started. But it requires dock to fetch icons from icon theme dynamicaly (I guess). If Latte doesn't support dynamic icons, it will create a launcher instance with a default icon and never change it afterwards.

Problem is, I didn't find a better solution than this and I guess it doesn't even exist.

BUT I have to test it myself and confirm this. If I'm right, we can discuss it in latte-dock repository.

BlueManCZ commented 4 years ago

Alright. I didn't even need to install Latte and I see those icons don't work even in the default KDE panel. The problem is I can't do much about it. Can you please try Plank dock and confirm it works at least here? If it does, we can create an issue in the relevant tracker and ask developers about it.

Remyrios commented 4 years ago

It does indeed work in plank. Actually it works in Plank too well because I have a folder opened with the name "Euro Truck Simulator 2" in dolphin and it changes icon of that too

BlueManCZ commented 4 years ago

Okay. So would you mind testing those newly added problematic games in Plank and closing issues for games that do work? I will create a new issue about what we talked here and let developers know about it.

Alright, I created an issue on Latte dock GitLab.

Remyrios commented 4 years ago

Done, thanks for putting so much work into this