Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions bin/omarchy-capture-screenrecording
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,10 @@ launch_wf_recorder() {
# -r 60 caps the framerate: capturing a 120 Hz panel at its native rate makes
# needlessly large files. -R 48000 keeps the AAC track at 48 kHz rather than
# following a sink that advertises 96 kHz into a file many players, and some
# speaker DSPs, play as silence.
wf-recorder "${geom_args[@]}" -r 60 -R 48000 "${audio_args[@]}" -f "$filename" 9>&- 2>>"$LOG_FILE" &
# speaker DSPs, play as silence. -D records every frame, not only changed
# ones: wf-recorder acts on a stop only after its next frame, which a still
# screen never sends, so the stop would wait for the kill.
wf-recorder "${geom_args[@]}" -D -r 60 -R 48000 "${audio_args[@]}" -f "$filename" 9>&- 2>>"$LOG_FILE" &
REC_PID=$!
}

Expand Down
4 changes: 4 additions & 0 deletions test/shell.d/screenrecording-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,10 @@ pkill -f "$stub_bin/wf-recorder" 2>/dev/null || true
[[ -s $wf_args ]] || fail "wf-recorder records when gpu-screen-recorder cannot start"
grep -Fxq -- '-o' "$wf_args" && grep -Fxq DP-1 "$wf_args" && grep -Fxq 48000 "$wf_args" ||
fail "wf-recorder records the focused monitor at 48 kHz" "$(<"$wf_args")"
# wf-recorder acts on a stop only after its next frame, and by default it asks
# for a frame only when the screen changes.
grep -Fxq -- '-D' "$wf_args" ||
fail "wf-recorder records every frame, so a stop on a still screen ends it" "$(<"$wf_args")"
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved
[[ $(<"$wf_runtime/omarchy-screenrecord-pid") == "$(<"$wf_pid")" ]] ||
fail "the recorder pid is the wf-recorder that is recording" "$(ls -a "$wf_runtime")"
[[ $(<"$wf_runtime/omarchy-screenrecord-filename") == "$wf_recordings"/* ]] ||
Expand Down
Loading