Repository navigation
Detect and stop Omarchy screen recording via gsr-cli IPC - #10397
calledtoconstruct wants to merge 10 commits into
Conversation
|
Reviewed on a disposable worker (Arch, procps-ng 4.0.7, gpu-screen-recorder 6.0.1): the diff read, the three substitutions exercised against real processes, The core change holds up, and it is worth saying why explicitly. Two things worth changing before this lands. 1. The gate now sees recorders the stop path cannot kill. Either half fixes it, and which one is a call for the maintainer rather than for me: widen the killer ( 2. "Fixes #10311" is not established. The mechanism the body describes is not the one that issue documents, and I could not reproduce the issue in either direction. On the worker, with two monitors and both One smaller thing, and the reason the body's first sentence does not quite land: a command line cannot be "left over" after the recorder exits — the 3. (low) The new test. Nothing was pushed to the branch: the first item is a design choice, not a defect with one correct repair. The tests above all passed as they stand ( For context, since two similar PRs are open at once: #10260 makes the same kind of change for the screensaver with |
|
There is a better way to do this now. gpu-screen-recorder can be launched with the -ipc option (for example |
|
@dec05eba The gate and stop now share that socket, so a systemd replay-buffer unit with absolute argv0 is no longer treated as an Omarchy recording.
The test no longer races on pidof and no longer forks a fake |
|
Since you stop it with gsr-cli, why keep RECORDING_PID_FILE and do kill? the gsr-cli stop is enough |
gsr-cli stop already saves and waits. A pid file and SIGINT/SIGKILL fallback is not needed.
|
|
quattro moved the recorder's state out of /tmp into a private runtime dir (omacom#8374). The gsr socket follows it there, and the bar indicator and menu guard resolve the same fallback, so all three name one socket and none of them falls back to a fixed /tmp name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
refresh() reads Quickshell.env, but the file imported only Quickshell.Io, so every refresh threw "ReferenceError: Quickshell is not defined" before the status check ran and the indicator never turned on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gsr-cli refuses a second stop while the first is still saving ("GPU Screen Recorder is already stopping"). A second press of Stop during the save then deleted the filename file before the first stop read it, so the recording was never finalized and the saved notification named an empty file. Only the stop that succeeded clears it now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
The status and stop calls also contain -ipc "$GSR_SOCKET", so the old assertion still passed with the flag dropped from the launch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
|
Re-reviewed at the new head on a disposable worker (Omarchy ISO, gpu-screen-recorder 6.1.0, a real Hyprland session running the shell from this branch), with Codex at medium effort as the second reviewer. Four commits are now on top of yours. The bug is real, and the switch to Pushed to your branch:
What was not run: an actual recording. The worker has no GPU, and gpu-screen-recorder refuses to record on llvmpipe, so @calledtoconstruct, could you confirm on your own machine at
Two things are for the maintainer to decide, not defects with one correct repair, so nothing was pushed for them:
Related: #11520, #12559 and #12471 also rewrite This waits on your confirmation, then on the maintainer. |
A successful notification was the last command, so --stop-recording exited 0 after a failed stop. The stop test now runs that path.
cleanup_webcam runs pkill -f WebcamOverlay. The stop test now stubs pkill and checks that the cleanup hits the stub.
The status call logs the same socket, so checking for the socket and for stop separately passed with stop sent elsewhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Re-reviewed at the new head on a disposable worker (Omarchy ISO, gpu-screen-recorder 6.1.0), with Codex at medium effort as the second reviewer over three rounds.
The fix still holds at this head. With an unrelated process named Pushed to your branch: Tests run on the worker at Still not run: a real recording, because the worker has no GPU. @calledtoconstruct, the request from the last comment still stands, now at This waits on that confirmation, then on the maintainer. |
The bar indicator used
pgrep -f, which stays true on leftover command-line matches after the recorder has exited and also matches unrelated processes whose args mention gpu-screen-recorder.pgrep -xcannot seegpu-screen-recorderat all:/proc/pid/commis 15 characters and the name is 19.pidoftreats any process by that name as an Omarchy recording, including a systemd replay-buffer unit whose argv0 is an absolute path. Stop still usedpgrep/pkill -f "^gpu-screen-recorder", which misses that argv0, so Stop can claim a save with an empty filename.Omarchy now starts
gpu-screen-recorderwith-ipc "${XDG_RUNTIME_DIR:-/tmp}/omarchy-gsr.sock". The capture helper, bar indicator, and menuwhen:all usegsr-cli -ipc <socket> status(exit 0 if that instance is running). Stop usesgsr-cli -ipc <socket> stop, so only the instance Omarchy started is gated and stopped. If that stop fails, SIGINT is sent only to the PID recorded when this capture started — never everygpu-screen-recorderon the machine.