mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 04:04:16 +02:00
Add window-curvature: adjustable curvature per dashboard window
steamFrame.dashboard.windowCurvature: the "Toggle Curvature" row of a
window's More Options menu becomes a control (click: curved -> flat,
flat -> stock; drag up/down with the laser: curvature relative to
SteamVR's stock curve, snapping to 0 and 1). The patch moves each frame's
curvature-origin node to stock distance / value in outgoing scene graphs;
per-window values live in the systemui page. Lookups by signature
("window-curvature" in signatures.json, incl. check-only anchors).
Shared method hooks (lib/hooks.js, passed by mkPatch as 4th argument):
one SendMessage wrapper for dashboard-windows (now VERSION 3) and
window-curvature instead of a chain of per-patch wrappers; legacy
wrappers on top are unwound.
This commit is contained in:
1 parent
8d7094916b
commit
bce51eb598
12 files changed
+877
-51
No files matched your search
@@ -16,8 +16,9 @@
|
||||
# Patches that need Steam's webpack modules should find them by signature
|
||||
# rather than by module id or minified export name, which change with Steam
|
||||
# updates: `steamFrame.uiPatches.lib.mkPatch` wraps a patch written as
|
||||
# `(find, sigs, opts) => …` with the finder library (lib/finders.js) and its
|
||||
# signatures; scripts/check-signatures.mjs checks signatures offline.
|
||||
# `(find, sigs, opts, hooks) => …` with the finder library (lib/finders.js),
|
||||
# its signatures and the shared method hooks (lib/hooks.js);
|
||||
# scripts/check-signatures.mjs checks signatures offline.
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.steamFrame.uiPatches;
|
||||
@@ -104,12 +105,13 @@ in {
|
||||
Helpers for writing patches (see modules/lib/default.nix):
|
||||
`mkPatch { name, src, signatures ? …, opts ? { } }` returns a patch
|
||||
file that calls `src`, a JavaScript function expression
|
||||
`(find, sigs, opts) => …`, with the finder library `find`
|
||||
`(find, sigs, opts, hooks) => …`, with the finder library `find`
|
||||
(modules/lib/finders.js: getWebpackRequire, resolveAll, findModule,
|
||||
findExport, findFiberUp, findInReactTree, …), the module signatures
|
||||
`sigs` (format: modules/lib/signatures.json; default: its entry
|
||||
`name`, if any) and `opts`. `finders` is
|
||||
the library's path, `signatures` the parsed signatures.json.
|
||||
`name`, if any), `opts` and the shared method hooks `hooks`
|
||||
(modules/lib/hooks.js: before, remove, has). `finders` and `hooks`
|
||||
are the libraries' paths, `signatures` the parsed signatures.json.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user