Files
Pierre Kisters 7fe68e055c Dashboard patches: persist frame-controls placements and "Steam hidden" on disk
SteamOS's steamvr.service runs `rm -rf ~/.cache/SteamVR` on every SteamVR
start, which deletes vrwebhelper's browser profile and with it the
localStorage frame-controls kept its placements in, so they were lost on
every SteamVR restart and reboot.

steam-ui-patches: per-patch persistent state (`state = true`). The injector
keeps ~/.local/state/steam-frame-nix/ui-patches/<name>.json, seeds
window.__sfuiStore in a fresh page before the patch runs and writes the file
(atomically, on change, name-checked, max 64 KiB) when the page calls the
CDP binding __sfuiStoreSave.

frame-controls v5: placements saved there (v4 localStorage copy migrated
once, then removed). steam-close-button v8: "Steam hidden" saved there; a
restored hidden state hides Steam once if SteamVR already shows it when the
patch attaches (or first shows it before the patch sees Steam's frame).

README: "Changes outside Nix" lists the directory; install.sh uninstall
removes it.
2026-09-28 23:33:12 +02:00

12 lines
461 B
JavaScript

// Reverts frame-controls/patch.js: ends a long press, closes the popup, restores
// stock control lists, removes wrappers (a wrapper wrapped by something else
// since stays inert in the chain), listeners, style and the theater Float
// actions. Keeps window.__sfuiFrameControlsState and the saved state file.
// Safe when not patched.
(() => {
const s = window.__sfuiFrameControls;
if (!s) return 'not patched';
s.teardown();
return 'unpatched';
})()