mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 04:04:16 +02:00
SteamVR screenshots linked into ~/Pictures
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.
This commit is contained in:
1 parent
b2babb3859
commit
26641d76a0
11 files changed
+301
-6
No files matched your search
@@ -26,6 +26,7 @@ is reported as "left alone" and never touched:
|
||||
| `jellyfin` | the hwdec shim entries in the Jellyfin Flatpak's user override `~/.local/share/flatpak/overrides/org.jellyfin.JellyfinDesktop` (nix-flatpak), an empty override file, and the shim copy of earlier versions in `~/.var/app/org.jellyfin.JellyfinDesktop` (marker `~/.local/state/steam-frame-nix/jellyfin-hwdec-shim`) |
|
||||
| `ui-state`: `~/.local/state/steam-frame-nix/ui-patches/<name>.json` | the dashboard patches' saved choices; `--all` only, never `--orphans`; stray `*.json.tmp` files |
|
||||
| `launchers`: `/run/user/1000/steam-frame-nix/applications` | the entries of [launchers](launchers.md) (tmpfs); `--all` only (switches remove those of removed launchers themselves) |
|
||||
| `screenshots`: `/run/user/1000/steam-frame-nix/screenshots` | a link to `*/userdata/*/760/remote/250820/screenshots` ([SteamVR screenshots](screenshots.md)); kept by `--orphans --keep screenshots` (while `steamUserId` is unset) |
|
||||
| `dirs` | `~/.local/state/steam-frame-nix` and `/run/user/1000/steam-frame-nix` when empty |
|
||||
|
||||
### Left by older versions
|
||||
|
||||
@@ -64,6 +64,11 @@ modules/
|
||||
of Flatpaks/host files in <runtimeDir>/steam-frame-nix/applications
|
||||
check.nix, fixtures/ test: real entries rewritten (fixtures/expected), generator runs
|
||||
docker.nix service: rootless dockerd (docker)
|
||||
screenshots.nix ~/Pictures link to the SteamVR screenshots (screenshots)
|
||||
screenshots/
|
||||
link.sh, package.nix service steam-frame-nix-screenshots (+ .path), switch:
|
||||
<runtimeDir>/steam-frame-nix/screenshots -> account folder
|
||||
check.nix test: account detection on fake Steam dirs
|
||||
firefox.nix Flatpak prefs extension and launcher (firefox)
|
||||
firefox/wrapper.nix app: launcher wrapper (desktop profile, fullscreen fix)
|
||||
firefox/check.nix test: wrapper against a fake flatpak
|
||||
@@ -128,6 +133,7 @@ they are kept even where a file name says more:
|
||||
| `frame-controls` | `dashboard.frameControls` | `frame-controls` (SteamVR, state) | `steam-ui-patches` |
|
||||
| `steamvr-debugger` | `steamvrDebugger` | | `steamvr-webhelper-debugger` |
|
||||
| `launchers` | `launchers` | | `steam-frame-nix-launchers` (`.service`, `.path`) |
|
||||
| `screenshots` | `screenshots` | | `steam-frame-nix-screenshots` (`.service`, `.path`) |
|
||||
|
||||
Log of all patches:
|
||||
`journalctl --user -u steam-ui-patches -u steam-keyboard-patch -u vr-keyboard-relay`.
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
# SteamVR screenshots
|
||||
|
||||
`screenshots.*`, module `screenshots`. Options:
|
||||
[README, Options](../README.md#options).
|
||||
|
||||
## Problem
|
||||
|
||||
Steam keeps VR screenshots deep in its data directory, under the Steam
|
||||
account ID, where Dolphin, Gwenview and the file pickers don't look.
|
||||
|
||||
## What you get
|
||||
|
||||
`~/Pictures/SteamVR Screenshots` (`screenshots.name`), a link to Steam's
|
||||
folder of SteamVR screenshots (app 250820):
|
||||
`~/.local/share/Steam/userdata/<account ID>/760/remote/250820/screenshots`.
|
||||
Nothing is copied; the link goes away when you turn the option off.
|
||||
|
||||
**Taking a screenshot:** hold the Steam button and click a trigger
|
||||
(SteamVR's `TakeScreenshot` chord). Steam writes the capture as a PNG to
|
||||
`/run/user/1000/Screenshot_*.png` (tmpfs, temporary), then imports it as a
|
||||
1920x1080 JPG into the folder above (small copies in `thumbnails/`, listed
|
||||
in `…/760/screenshots.vdf`). The JPG is the only copy that stays.
|
||||
|
||||
## Configuration
|
||||
|
||||
```nix
|
||||
steamFrame.screenshots.enable = true;
|
||||
# steamFrame.screenshots.steamUserId = "80511808"; # optional
|
||||
```
|
||||
|
||||
The account ID is found at runtime: the account last logged in to Steam
|
||||
(`MostRecent`, else the latest `timestamp` in
|
||||
`~/.local/share/Steam/config/loginusers.vdf`), else the only folder in
|
||||
`~/.local/share/Steam/userdata`; it follows when you switch accounts.
|
||||
`steamUserId` (the folder name, `ls ~/.local/share/Steam/userdata`) fixes
|
||||
it instead: a plain Home Manager link, no service.
|
||||
|
||||
## Caveats
|
||||
|
||||
- Steam creates the folder with the first screenshot: until then the link
|
||||
points nowhere.
|
||||
- Only SteamVR's folder is linked; screenshots Steam files under another app
|
||||
are in `…/760/remote/<app ID>/screenshots`.
|
||||
- Without `steamUserId`, when no account is found there is no link (the
|
||||
service warns in `journalctl --user -u steam-frame-nix-screenshots`).
|
||||
|
||||
## How it works
|
||||
|
||||
Without `steamUserId`, `~/Pictures/<name>` is a Home Manager link to
|
||||
`/run/user/1000/steam-frame-nix/screenshots`, a link that the oneshot user
|
||||
service `steam-frame-nix-screenshots` points to the account's folder: on
|
||||
switch, at login and when `loginusers.vdf` or `userdata` changes (path
|
||||
unit). Its lifetime and cleanup:
|
||||
[Changes outside Nix](../README.md#changes-outside-nix-exceptions).
|
||||
Reference in new issue
Block a user