Steam: Difference between revisions

Ardenet (talk | contribs)
Adjust the position of page translation tags & Add `Special:MyLanguage` prefix and `tvar` tags
m Fixed typo in Link
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
[https://store.steampowered.com/ Steam] is a digital distribution platform for video games, offering a vast library for purchase, download, and management. On NixOS, Steam is generally easy to install and use, often working "out-of-the-box". It supports running many Windows games on Linux through its compatibility layer, [[<tvar name=1>Special:MyLanguage/#Proton</tvar>|Proton]].<ref>https://store.steampowered.com/</ref>
[https://store.steampowered.com/ Steam] is a digital distribution platform for video games, offering a vast library for purchase, download, and management. On NixOS, Steam is generally easy to install and use, often working "out-of-the-box". It supports running many Windows games on Linux through its compatibility layer, [[<tvar name=1>#Proton</tvar>|Proton]].<ref>https://store.steampowered.com/</ref>
</translate>
</translate>


Line 21: Line 21:
<translate>
<translate>
<!--T:5-->
<!--T:5-->
This provides the tools in your current shell without adding them to your system configuration. For <code>steamcmd</code> to work correctly for some tasks (like initializing for steam-tui), you might need to run it once to generate necessary files, as shown in the [[<tvar name=1>Special:MyLanguage/#steam-tui</tvar>| steam-tui section]].
This provides the tools in your current shell without adding them to your system configuration. For <code>steamcmd</code> to work correctly for some tasks (like initializing for steam-tui), you might need to run it once to generate necessary files, as shown in the [[<tvar name=1>#steam-tui</tvar>| steam-tui section]].
</translate>
</translate>


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>
 
<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>


<!--T:59-->
<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.