mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 01:00:13 +02:00
Steam keeps VR screenshots (Steam button + trigger) in ~/.local/share/Steam/userdata/<account ID>/760/remote/250820/screenshots, where Dolphin, Gwenview and the file pickers don't look. screenshots (module screenshots, opt-in) links ~/Pictures/<name> (default "SteamVR Screenshots") there. The account ID comes from steamUserId, or, unset, at runtime: the Home Manager link points to <runtimeDir>/steam-frame-nix/screenshots (tmpfs), which the oneshot user service steam-frame-nix-screenshots points to the account last logged in (loginusers.vdf MostRecent, else latest timestamp, else the only userdata folder), on switch, at login and when loginusers.vdf or userdata changes. install.sh cleanup knows the tmpfs link (--keep screenshots while used). Flake checks: account detection on fake Steam dirs; cleanup of the link.
12 lines
492 B
Nix
12 lines
492 B
Nix
# steam-frame-nix-screenshots: link.sh with the outer runtime dir and the
|
|
# Steam directory (both overridable by environment, for the check).
|
|
{ lib, pkgs, runtimeDir, steam }:
|
|
pkgs.writeShellApplication {
|
|
name = "steam-frame-nix-screenshots";
|
|
runtimeInputs = [ pkgs.coreutils pkgs.gawk ];
|
|
text = ''
|
|
runtime=''${STEAM_FRAME_NIX_RUNTIME_DIR:-${lib.escapeShellArg runtimeDir}}
|
|
steam=''${STEAM_FRAME_NIX_STEAM_DIR:-${lib.escapeShellArg steam}}
|
|
'' + builtins.readFile ./link.sh;
|
|
}
|