Files
lhns--steam-frame-nix/modules/steam-close-button.nix
T
Pierre Kisters 71c78bd733 Dashboard options: windows.*, detent names, positive number types
- dashboard.windowMaxScale / windowDistance -> dashboard.windows.maxScale /
  distance
- windowCurvature: default -> initial, snapPixels/snapPoints ->
  detentPixels/detentPoints, dragThreshold -> dragThresholdPixels (also the
  patch's option keys; window-curvature VERSION 19); removed `snap` now
  points to detentPixels
- types.numbers.positive/nonnegative instead of number + range assertions
  (step <= max, initial/detentPoints <= max and distance min <= max stay)
- frame-controls patch accepts longPressMs from 300, like the option
  (VERSION 2)
- "SteamVR dashboard patch" in descriptions, which fit into 80 columns

Old names keep working with a rename warning.
2026-09-28 03:36:38 +02:00

29 lines
1.1 KiB
Nix

# Close (X) button on the dashboard's Steam window. SteamVR dashboard patch
# (steam-close-button/patch.js; "systemui" on 127.0.0.1:8087), registered only
# when enabled; enables steamvr-debugger.nix (one SteamVR restart the first time).
{ config, lib, pkgs, ... }:
let
cfg = config.steamFrame.dashboard.steamCloseButton;
inherit (import ./lib { inherit pkgs; }) mkPatch;
in {
imports = [ ./steam-ui-patches.nix ./steamvr-debugger.nix ];
options.steamFrame.dashboard.steamCloseButton.enable = lib.mkEnableOption ''
a Close (X) button on the dashboard's Steam window. It hides Steam
(previous window or just the bar) until shown explicitly, e.g. via the
Steam tab. SteamVR dashboard patch; off removes it (next switch)'';
config = lib.mkIf cfg.enable {
steamFrame.uiPatches.patches = [ {
name = "steam-close-button";
endpoint = "http://127.0.0.1:8087";
target.title = "systemui";
patch = mkPatch {
name = "steam-close-button";
src = ./steam-close-button/patch.js;
};
unpatch = ./steam-close-button/unpatch.js;
} ];
};
}