Skip to content

Description

Ivo Šmerek edited this page Nov 24, 2021 · 2 revisions

This wiki page explains how the SIF script works.

sif.py script

  1. Finds all Steam library folders and installed games.
  2. For each one game checks two conditions:
    1. If the game has a record in database.json or uses the Proton compatibility tool.
    2. If the particular game icon is available in the selected icon theme.
  3. Creates hidden .desktop file with correct Name, Icon and StartupWMClass for each game.
  4. If required, adds a fix-wm-class.sh script to Steam game launch options.

It's safe - The script must be run by a regular user and modifies only files in ~/.local/share/applications/steam-icons-fixed directory. It explicitly warns you if you try to run it as a root.

Execution of this script is automatically appended to Steam game launch options.

It is a simple shell script for fixing games with the missing WM_CLASS window attribute. The script takes two arguments - the first is required and the second is optional. The first argument is a string containing the WM_NAME attribute of the game window - it works as a selector. The second argument is a new WM_CLASS string.

The script finds a window with WM_NAME specified in the first argument and sets its WM_CLASS to the value from the second argument. If the second argument is not provided, the first argument is used instead - the window attributes WM_CLASS and WM_NAME will be equal.

Clone this wiki locally