mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 04:04:16 +02:00
UI patches: docs line wrapping, mkPatch link text
This commit is contained in:
1 parent
521092d66b
commit
ad7e4f7678
2 files changed
+12
-11
No files matched your search
@@ -273,7 +273,7 @@ which: [Repository layout](docs/development.md).
|
|||||||
| `steamFrame.uiPatches.patches.*.patch` | path | required | JS evaluated (awaited) in every matching page. |
|
| `steamFrame.uiPatches.patches.*.patch` | path | required | JS evaluated (awaited) in every matching page. |
|
||||||
| `steamFrame.uiPatches.patches.*.unpatch` | null or path | `null` | JS evaluated when the service stops. |
|
| `steamFrame.uiPatches.patches.*.unpatch` | null or path | `null` | JS evaluated when the service stops. |
|
||||||
| `steamFrame.uiPatches.patches.*.state` | bool | `false` | One [persistent JSON value](docs/ui-patches.md#persistent-state) for the patch. |
|
| `steamFrame.uiPatches.patches.*.state` | bool | `false` | One [persistent JSON value](docs/ui-patches.md#persistent-state) for the patch. |
|
||||||
| `steamFrame.uiPatches.lib` | attrs, read-only | | Patch helpers (`mkPatch`), see [Finders and signatures](docs/ui-patches.md#mkpatch). |
|
| `steamFrame.uiPatches.lib` | attrs, read-only | | Patch helpers (`mkPatch`), see [mkPatch](docs/ui-patches.md#mkpatch). |
|
||||||
| `steamFrame.launcherMenu.sort` | bool | `false` | Sort the "+" menu alphabetically. |
|
| `steamFrame.launcherMenu.sort` | bool | `false` | Sort the "+" menu alphabetically. |
|
||||||
| `steamFrame.launcherMenu.pinDesktop` | null or `"top"` / `"bottom"` | `null` | Pin "Desktop" above/below the "+" menu's list; `null`: normal entry. |
|
| `steamFrame.launcherMenu.pinDesktop` | null or `"top"` / `"bottom"` | `null` | Pin "Desktop" above/below the "+" menu's list; `null`: normal entry. |
|
||||||
| `steamFrame.launcherMenu.closeOnLaunch` | bool | `false` | Close the "+" menu when a program is clicked. |
|
| `steamFrame.launcherMenu.closeOnLaunch` | bool | `false` | Close the "+" menu when a program is clicked. |
|
||||||
|
|||||||
+11
-10
@@ -53,9 +53,9 @@ it runs. What they have in common:
|
|||||||
|
|
||||||
- Each turns on the [SteamVR debugger](steamvr-debugger.md) (**the first
|
- Each turns on the [SteamVR debugger](steamvr-debugger.md) (**the first
|
||||||
time, restart SteamVR once**).
|
time, restart SteamVR once**).
|
||||||
- They depend on SteamVR UI internals: each is found by signature (its entry
|
- They depend on SteamVR UI internals: each is found by signature (its
|
||||||
in `modules/steam-ui-patches/lib/signatures.json` has the patch's name); after an update
|
entry in `modules/steam-ui-patches/lib/signatures.json` has the patch's
|
||||||
that changes them the dashboard stays stock (see
|
name); after an update that changes them the dashboard stays stock (see
|
||||||
[after a Steam update](#after-a-steam-update)). Tested with SteamVR build
|
[after a Steam update](#after-a-steam-update)). Tested with SteamVR build
|
||||||
11008059.
|
11008059.
|
||||||
- All are laser-only: gamepad navigation sees the stock dashboard.
|
- All are laser-only: gamepad navigation sees the stock dashboard.
|
||||||
@@ -111,8 +111,9 @@ see [changes outside Nix](../README.md#changes-outside-nix-exceptions).
|
|||||||
## Finders and signatures
|
## Finders and signatures
|
||||||
|
|
||||||
Webpack module ids and export names change with every Steam UI build, so
|
Webpack module ids and export names change with every Steam UI build, so
|
||||||
patches never use them. `modules/steam-ui-patches/lib/finders.js` (like Decky Loader's
|
patches never use them. `modules/steam-ui-patches/lib/finders.js` (like
|
||||||
`findModule`/`findInReactTree` or Vencord's `find`) locates by *signature*:
|
Decky Loader's `findModule`/`findInReactTree` or Vencord's `find`) locates
|
||||||
|
by *signature*:
|
||||||
|
|
||||||
- a **module** by strings/regexes in its factory source;
|
- a **module** by strings/regexes in its factory source;
|
||||||
- an **export** by shape: type, function source, arity, data properties,
|
- an **export** by shape: type, function source, arity, data properties,
|
||||||
@@ -127,8 +128,8 @@ candidates r_, xy` as the patch's result. Results are cached per page. The
|
|||||||
library also has `ensureStyle(doc, id, css)` and `logger(buffer)` (a capped
|
library also has `ensureStyle(doc, id, css)` and `logger(buffer)` (a capped
|
||||||
debug log).
|
debug log).
|
||||||
|
|
||||||
Signatures live in `modules/steam-ui-patches/lib/signatures.json`, shared by patches and the
|
Signatures live in `modules/steam-ui-patches/lib/signatures.json`, shared
|
||||||
offline checker. An entry can also list `expects` (strings the patch relies
|
by patches and the offline checker. An entry can also list `expects` (strings the patch relies
|
||||||
on, checked offline only) or be `checkOnly` (anchors not used through the
|
on, checked offline only) or be `checkOnly` (anchors not used through the
|
||||||
finder, checked offline only; with `stylesheet` instead of `module` it is
|
finder, checked offline only; with `stylesheet` instead of `module` it is
|
||||||
matched against the bundle's CSS).
|
matched against the bundle's CSS).
|
||||||
@@ -168,9 +169,9 @@ steamFrame.uiPatches.patches = [ {
|
|||||||
|
|
||||||
### Shared method hooks
|
### Shared method hooks
|
||||||
|
|
||||||
`modules/steam-ui-patches/lib/hooks.js`, argument `hooks`, also `window.__sfuiHooks`: patches
|
`modules/steam-ui-patches/lib/hooks.js`, argument `hooks`, also
|
||||||
intercepting the same method (e.g. the dashboard mailbox's `SendMessage`,
|
`window.__sfuiHooks`: patches intercepting the same method (e.g. the
|
||||||
used by [dashboard windows](dashboard-windows.md#how-it-works) and
|
dashboard mailbox's `SendMessage`, used by [dashboard windows](dashboard-windows.md#how-it-works) and
|
||||||
[window curvature](window-curvature.md#how-it-works)) register named hooks;
|
[window curvature](window-curvature.md#how-it-works)) register named hooks;
|
||||||
one wrapper per method runs them in registration order, so patches can be
|
one wrapper per method runs them in registration order, so patches can be
|
||||||
injected, upgraded and reverted in any order.
|
injected, upgraded and reverted in any order.
|
||||||
|
|||||||
Reference in new issue
Block a user