Files
lhns--steam-frame-nix/modules/launcher-menu/show-all/patch.js
T
Pierre Kisters 5d15902ba1 Clearer file names and layout; docs/development.md
- steam-keyboard-patch.nix -> vr-keyboard-extra-keys.nix (option
  keyboard.vr.extraKeys), helper.mjs -> xdotool-helper.mjs;
  homeManagerModules.steam-keyboard-patch stays as an alias.
- vr-keyboard: panel.js/unpatch-panel.js/relay.mjs ->
  suggestions-panel/{patch,unpatch}.js + relay.mjs; decoder.js ->
  swipe-decoder.js; build.nix split into dictionary.nix and check.nix.
- modules/lib -> modules/steam-ui-patches/lib (the UI patch library).
- docs/development.md: repository layout (what runs where), runtime names.

Patch names, user services and state files are unchanged.
2026-09-29 01:42:34 +02:00

30 lines
1.6 KiB
JavaScript

// show-all: the VR dashboard's "+" menu lists all programs without Steam's
// Developer Mode.
// mkPatch patch (see steam-ui-patches/lib/default.nix); no opts; sigs:
// "launcher-menu-show-all" (the module exporting the list, plus a check-only
// anchor for the filter).
//
// Steam hides some executables always (steam, vrurlhandler) and, without
// Developer Mode, a second list (firewall-config, vlc, dolphin, cmake-gui,
// plasma-discover, konsole, systemsettings, qrenderdoc, sh, lxterminal) via
// `bDevMode || block.push(...devModeOnly)`; nothing else uses that array.
// The patch gives it an own, empty Symbol.iterator, so spreading adds
// nothing while its contents (and the signature) stay intact and the setting
// itself is untouched. Remembered as window.__sfuiShowAllApps for unpatch.js.
((find, sigs) => {
const VERSION = 2;
const mods = find.resolvePatch('webpackChunksteamui', sigs);
if (typeof mods === 'string') return mods;
const list = mods.devModeApps.exports.devModeOnly;
if (!Array.isArray(list)) return 'Developer Mode app list is not an array, Steam left unpatched';
const prev = window.__sfuiShowAllApps;
if (prev && prev.list === list && prev.version === VERSION &&
Object.prototype.hasOwnProperty.call(list, Symbol.iterator)) return 'unchanged';
Object.defineProperty(list, Symbol.iterator, {
configurable: true, writable: true, enumerable: false,
value: function* sfuiShowAllApps() {},
});
window.__sfuiShowAllApps = { version: VERSION, list };
return `patched (no longer hidden: ${Array.prototype.join.call(list, ', ')})`;
})