From 5eb1d07d013339a919f3f6480ea82e2e77a3b7b5 Mon Sep 17 00:00:00 2001 From: Pierre Kisters <1524059+lhns@users.noreply.github.com> Date: Sun, 27 Sep 2026 21:56:48 +0200 Subject: [PATCH] launcher-menu: showAllApps lists all programs without Developer Mode Without Steam's Developer Mode the "+" menu hides konsole, systemsettings, dolphin, plasma-discover, vlc and a few more by executable name. The patch empties only that list's iterator, leaving the setting itself untouched. --- README.md | 17 +++++++++ modules/launcher-menu.nix | 22 ++++++++++++ modules/launcher-menu/show-all/patch.js | 42 +++++++++++++++++++++++ modules/launcher-menu/show-all/unpatch.js | 11 ++++++ modules/lib/signatures.json | 20 +++++++++++ template/home.nix | 3 ++ 6 files changed, 115 insertions(+) create mode 100644 modules/launcher-menu/show-all/patch.js create mode 100644 modules/launcher-menu/show-all/unpatch.js diff --git a/README.md b/README.md index 8765b61..20b00b9 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,7 @@ the two files below). closeOnLaunch = true; launchDebounce = 10; grid = { enable = true; columns = 4; maxRows = 4; }; + showAllApps = true; }; dashboard = { windowMaxScale = 4.0; @@ -196,6 +197,7 @@ menu list every desktop entry, including terminals such as Konsole. | `steamFrame.launcherMenu.grid.enable` | bool | `false` | Show the "+" menu's programs as a grid of tiles (large icon, name below) instead of a list. | | `steamFrame.launcherMenu.grid.columns` | int, 1-8 | `4` | Tiles per row (popup is 300 px wide: 3 ≈ 92 px, 4 ≈ 68 px, 5 ≈ 53 px tiles). | | `steamFrame.launcherMenu.grid.maxRows` | null or positive int | `null` | Rows visible at once, the rest scrolls. `null`: fill up to the menu's max height (600 px). | +| `steamFrame.launcherMenu.showAllApps` | bool | `false` | List all programs in the "+" menu without Steam's Developer Mode (Konsole, KDE System Settings, Dolphin, Discover, VLC, ... are hidden otherwise). See [Launcher menu](#launcher-menu-launchermenu). | | `steamFrame.launcherMenu.iconFallbacks.enable` | bool | `true` | On every switch, link hicolor fallbacks (Breeze app icons) for desktop entries whose icon Steam can't find, so the "+" menu shows them (SteamOS: Konsole, KDE System Settings). `false` removes the links. See [Icon fallbacks](#icon-fallbacks-launchermenuiconfallbacks). | | `steamFrame.launcherMenu.iconFallbacks.extra` | list of str | `[ ]` | Further icon names to provide even if no desktop entry the scan sees uses them. | | `steamFrame.dashboard.windowMaxScale` | null or number | `null` | Largest resize-handle scale of SteamVR dashboard windows, relative to their default size. `null`: stock (2). See [Dashboard windows](#dashboard-windows-dashboard). | @@ -564,6 +566,21 @@ the program twice. directions from the panel's CSS grid, so up/down/left/right move between tiles. +- `showAllApps = true`: without Steam's Developer Mode, the menu hides a + fixed list of programs by executable name (`konsole`, `systemsettings`, + `dolphin`, `plasma-discover`, `vlc`, `firewall-config`, `cmake-gui`, + `qrenderdoc`, `lxterminal`, `sh`); Steam's scan still finds them. The + menu's filter adds that list to its block list only when Developer Mode + is off (`bDevMode || block.push(...list)`), and nothing else uses the list, + so the patch gives that one array an empty iterator: nothing is added, + the setting itself (used by other settings pages) is untouched. So + Developer Mode can stay off: it also turns on sshd, xrdp, the devkit + service and SteamOS's LAN forwards of the DevTools ports (0.0.0.0:8081 and + 8088), none of which the patches need. Hide single programs with + `steamFrame.hiddenApps`. Found by signature (webpack module with the + `developer_mode_enabled` accessor and the list); the offline checker also + verifies the filter still spreads the list. + All are reverted when the options are turned off (next switch). These patches use Steam APIs (`SteamClient.Apps`), React props and CSS rather than webpack modules; the offline checker verifies those anchors too diff --git a/modules/launcher-menu.nix b/modules/launcher-menu.nix index 4738241..cf916b8 100644 --- a/modules/launcher-menu.nix +++ b/modules/launcher-menu.nix @@ -112,6 +112,19 @@ in { ''; }; }; + showAllApps = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + List all programs in the "+" menu without Steam's Developer Mode. + Without it, Steam hides a fixed list (konsole, systemsettings, + dolphin, plasma-discover, vlc, firewall-config, cmake-gui, qrenderdoc, + lxterminal, sh). Only that list is emptied; the Developer Mode setting + itself (used by other settings pages) is untouched. Hide individual + programs with steamFrame.hiddenApps. Runtime patch of Steam's UI + (steamFrame.uiPatches). + ''; + }; iconFallbacks = lib.mkOption { default = { }; description = '' @@ -223,5 +236,14 @@ in { opts = { inherit (cfg.grid) columns maxRows; }; }; unpatch = ./launcher-menu/grid/unpatch.js; + } + ++ lib.optional cfg.showAllApps { + name = "launcher-menu-show-all"; + target = sharedJSContext; + patch = mkPatch { + name = "launcher-menu-show-all"; + src = ./launcher-menu/show-all/patch.js; + }; + unpatch = ./launcher-menu/show-all/unpatch.js; }; } diff --git a/modules/launcher-menu/show-all/patch.js b/modules/launcher-menu/show-all/patch.js new file mode 100644 index 0000000..1e7a2d8 --- /dev/null +++ b/modules/launcher-menu/show-all/patch.js @@ -0,0 +1,42 @@ +// launcher-menu show-all: the VR dashboard's "+" menu lists all programs +// without Steam's Developer Mode. +// Steam filters the programs of ScanForInstalledNonSteamApps() by the base +// name of their executable: some are always hidden (steam, vrurlhandler), +// and without Developer Mode (client setting developer_mode_enabled) also a +// second list: firewall-config, vlc, dolphin, cmake-gui, plasma-discover, +// konsole, systemsettings, qrenderdoc, sh, lxterminal. The menu's filter +// spreads that list into its block list only when Developer Mode is off +// (`bDevMode || block.push(...devModeOnly)`), and nothing else uses it. +// +// This file is a function expression, called by the file lib/default.nix +// (mkPatch) generates: ()(find, sigs), with find the finder +// library (lib/finders.js) and sigs this patch's module signatures +// (lib/signatures.json, "launcher-menu-show-all": the module exporting the +// list, plus a check-only anchor for the filter). No options. +// +// The patch gives that one array an own, empty Symbol.iterator, so spreading +// it adds nothing; its contents stay as they are (the signature keeps +// matching on re-injection) and the Developer Mode setting itself, used +// elsewhere (settings pages, controller pairing, ...), is not touched. The +// menu re-filters whenever it rescans, i.e. on every open. The array is +// remembered as window.__sfuiShowAllApps for unpatch.js. Idempotent. +((find, sigs) => { + const VERSION = 1; + let mods; + try { + mods = find.resolveAll(find.getWebpackRequire('webpackChunksteamui'), sigs); + } catch (e) { + return `signature not found, Steam left unpatched: ${e.message}`; + } + 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, ', ')})`; +}) diff --git a/modules/launcher-menu/show-all/unpatch.js b/modules/launcher-menu/show-all/unpatch.js new file mode 100644 index 0000000..bb773f8 --- /dev/null +++ b/modules/launcher-menu/show-all/unpatch.js @@ -0,0 +1,11 @@ +// Reverts show-all/patch.js: removes the empty iterator from Steam's +// Developer Mode app list (remembered as window.__sfuiShowAllApps), so the +// "+" menu hides those programs again while Developer Mode is off. Safe when +// not patched. +(() => { + const s = window.__sfuiShowAllApps; + if (!s) return 'not patched'; + if (s.list && Object.prototype.hasOwnProperty.call(s.list, Symbol.iterator)) delete s.list[Symbol.iterator]; + delete window.__sfuiShowAllApps; + return 'unpatched'; +})() diff --git a/modules/lib/signatures.json b/modules/lib/signatures.json index c6385bb..78eae57 100644 --- a/modules/lib/signatures.json +++ b/modules/lib/signatures.json @@ -137,6 +137,26 @@ } } }, + "launcher-menu-show-all": { + "bundle": "steamui", + "modules": { + "devModeApps": { + "module": { "includes": ["\"developer_mode_enabled\"", "\"firewall-config\"", "\"vrurlhandler\"", "\"Install Chromium\""] }, + "exports": { + "devModeOnly": { "type": "object", "has": ["push"], "props": { "0": "firewall-config" } } + }, + "expects": ["\"konsole\"", "\"systemsettings\"", "\"dolphin\"", "\"plasma-discover\""] + }, + "launcherFilter": { + "checkOnly": true, + "module": { + "includes": ["allowLaunchProgram", "#VRDashboard_LaunchNonSteamApp", "strExePath.endsWith(\"/\"+"], + "regex": ["/\\|\\|[\\w$]+\\.push\\(\\.\\.\\.[\\w$]+\\.[\\w$]+\\),[\\w$]+\\.filter\\(/"] + }, + "expects": ["strAppName==", "strExePath=="] + } + } + }, "dashboard-windows": { "bundle": "vrwebui-systemui", "modules": { diff --git a/template/home.nix b/template/home.nix index 659aaa0..3737c43 100644 --- a/template/home.nix +++ b/template/home.nix @@ -26,6 +26,9 @@ # closeOnLaunch = true; # launchDebounce = 10; # grid = { enable = true; columns = 4; maxRows = 4; }; + # # All programs without Steam's Developer Mode (Konsole, KDE System + # # Settings, Dolphin, ... are hidden otherwise): + # showAllApps = true; # # Icon fallbacks for programs without an icon in the menu are on by # # default; names to provide in addition to what the scan finds: # # iconFallbacks.extra = [ "system-file-manager" ];