Steam: Difference between revisions
m fix link error |
Shaded9740 (talk | contribs) m Fixed typo in Link |
||
| (One intermediate revision by the same user not shown) | |||
| Line 283: | Line 283: | ||
<!--T:58--> | <!--T:58--> | ||
For games running through Proton, the value should be <code>steam_app_<game_id></code> (where <code><game_id></code> matches the value after steam://rungameid/ on the <code>Exec</code> line). | For games running through Proton, the value should be <code>steam_app_<game_id></code> (where <code><game_id></code> matches the value after steam://rungameid/ on the <code>Exec</code> line). To automate this with [[Home Manager]] (executed on every rebuild): | ||
</translate> | |||
<!--T:59--> | <syntaxhighlight lang="nix"> | ||
home.activation.fixSteamIcons = lib.hm.dag.entryAfter [ "writeBoundary" ] '' | |||
for f in ~/.local/share/applications/*.desktop; do | |||
id=$(grep -Eo 'steam://rungameid/[0-9]+' "$f" | sed 's#.*/##') || true | |||
[ -n "$id" ] || continue | |||
last=$(tail -n1 "$f" || true) | |||
want="StartupWMClass=steam_app_$id" | |||
[ "$last" = "$want" ] || echo "$want" >> "$f" | |||
done | |||
''; | |||
</syntaxhighlight> | |||
<translate><!--T:59--> | |||
For games running natively, the value should match the game's main executable. | For games running natively, the value should match the game's main executable. | ||