testsAndMisc/linux_configuration/features/systemd/game-rec-auto.service
Krzysztof kuhy Rudnicki f86c5c331d
Some checks are pending
md-naming / markdown naming convention (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (mypy, mypy) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (pylint, pylint) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (rest, ) (push) Waiting to run
Pre-commit checks / pre-commit (${{ matrix.group }}) (shellcheck, shellcheck) (push) Waiting to run
Python tests / test (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / lib-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Add game-rec auto recorder for Steam games
Records every Steam game from launch to exit with gpu-screen-recorder: a jeepney D-Bus watcher on app-steam-app* scopes (game-rec-auto user unit), a $mod+Shift+g hotkey and an i3blocks dot. Failure modes: a daemon-reload no longer ends a live recording (ActiveState is re-checked before removal); a hotkey start with no matching audio stream falls back to the guessed app name and retries without it if gsr rejects it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWVxiT9Y4MhGeKGz9dX
2026-11-22 22:50:54 +01:00

22 lines
661 B
Desktop File

[Unit]
Description=Record every Steam game with game-rec, start to exit
After=graphical-session.target
PartOf=graphical-session.target
# A broken helper (exit 1 on every start) shows as a failed unit, not a loop.
StartLimitIntervalSec=300
StartLimitBurst=5
[Service]
Type=simple
Environment=DISPLAY=:0
# The login's cookie; i3 may not have exported XAUTHORITY to systemd yet.
Environment=XAUTHORITY=%h/.Xauthority
# Recordings run in their own transient scopes (systemd-run --scope), so a
# stop or restart here never kills one.
ExecStart=/bin/bash @GAME_REC_DIR@/game_rec_watch.sh
Restart=on-failure
RestartSec=3s
[Install]
WantedBy=graphical-session.target