Try to detect Steam path via script?
Non-Flatpak Steam seems to be located in ~/.local/share/Steam/ which is what I've used as the default value, but Steam itself always creates ~/.steam that contains various symlinks to the real locations, so we could use that to resolve the paths. It's probably not worth trying to use a third-party CLI tool since that would require users to install them, which will require logging into Steam via a token and it's all just too much to ask of the average user.
Links
-
https://github.com/berenm/steam-cli - Note: requires
steamcmdto be available but isn't made explicit on the project page. - https://developer.valvesoftware.com/wiki/SteamCMD - Mostly for dedicated server management, but also could be used to get some info on the Steam install.