Stop offering Steam games as applications

Steam writes a desktop entry for every game somebody asks for a shortcut
to, and it starts the same program the client's own entry does:

    Exec=steam steam://rungameid/3527290

The scan only ever looked at the first token, found steam there, and filed
the game under the same kind as the client. So PEAK sat in the applications
list reading "on (Steam)", counted towards the applications covered, and
offered a space bar to switch it off again - as though it were something
this program had anything to offer. It is not: a game is whatever engine it
was built with, and none of them reads a Chromium argument.

An entry carrying a steam:// address of its own is not a program, it is one
more way of starting Steam. The client's own entry never has one - it takes
an address from the outside, through %U - and that is what tells the two
apart. Those entries go to the Steam module now instead of into the list.

They keep -noverifyfiles, for the same reason the rest of the Steam handling
has it: starting a game with the client closed is a Steam start like any
other, and without the switch it finds the patched web helper script, puts
its own copy back, and the interface loses autoscroll for the rest of the
session.
This commit is contained in:
Felitendo committed 2026-08-24 10:06:29 +02:00
1 parent f42d80598f
commit bd84c6645a
4 files changed
+53

No files matched your search

+30
View File
@@ -180,6 +180,21 @@ mca_exec_flatpak_id() {
return 1
}
# mca_exec_is_steam_link <exec line> <program>
# Whether an entry starts something inside Steam rather than starting Steam
# itself: it carries a steam:// address of its own. Steam writes one of those
# for every game somebody asks for a shortcut to, and the client's own entry
# never has one - it takes an address from the outside, through %U.
mca_exec_is_steam_link() {
local line="$1" prog="$2"
[[ $line == *steam://* ]] || return 1
case "${prog##*/}" in
steam|steam-runtime) return 0 ;;
esac
[[ $prog == flatpak:com.valvesoftware.Steam ]]
}
# ---------------------------------------------------------------------------
# Is this Chromium?
# ---------------------------------------------------------------------------
@@ -401,6 +416,14 @@ MCA_NAMES=() # display name
MCA_PROGS=() # resolved program, or a flatpak app id
MCA_KINDS=() # app | browser | flatpak | steam | unknown | no
# The shortcuts Steam writes for single games. Not applications of their own - a
# game is whatever engine it was built with, and none of those reads a Chromium
# argument - so they are kept apart from the list rather than listed as
# something that got switched on. They do start Steam, which is why they are
# kept at all: the Steam module gives them Steam's own switch.
MCA_STEAM_LINKS=() # desktop file id
MCA_STEAM_LINK_FILES=() # the entry that is in effect for it
# A scan reads every desktop entry on the system, so the menu does it once and
# then redraws from what it found. Applying rescans on its own, so nothing else
# has to remember to invalidate this.
@@ -417,6 +440,7 @@ mca_scan() {
local -a c_ids=() c_files=() c_names=() c_progs=() c_browser=() c_stat=()
MCA_IDS=(); MCA_FILES=(); MCA_NAMES=(); MCA_PROGS=(); MCA_KINDS=()
MCA_STEAM_LINKS=(); MCA_STEAM_LINK_FILES=()
# Pass one: read the entries and work out what each of them starts. No
# detection yet - that needs a stat per program, and those are collected so
@@ -454,6 +478,12 @@ mca_scan() {
prog="flatpak:$MCA_PROG"
fi
if mca_exec_is_steam_link "$exec_line" "$prog"; then
MCA_STEAM_LINKS+=("$id")
MCA_STEAM_LINK_FILES+=("$file")
continue
fi
c_ids+=("$id"); c_files+=("$file"); c_names+=("$name")
c_progs+=("$prog")
if mca_desktop_is_browser; then c_browser+=(1); else c_browser+=(0); fi