From 3aa51a5c01e7832605705cb71dc9a14f315c6e79 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Thu, 17 Sep 2026 15:05:35 +0100 Subject: Prefer the dock camera and use the camera portal --- dot_local/bin/executable_rqr | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'dot_local/bin') diff --git a/dot_local/bin/executable_rqr b/dot_local/bin/executable_rqr index 76ea698..5b768ce 100755 --- a/dot_local/bin/executable_rqr +++ b/dot_local/bin/executable_rqr @@ -1,6 +1,24 @@ #!/usr/bin/env dash -text="$(zbarcam -q -1 --raw)" +set -eu + +camera="" +for candidate in \ + /dev/v4l/by-id/*HP_430_435_FHD_Webcam*-video-index0 \ + /dev/v4l/by-id/*-video-index0 \ + /dev/video*; do + if [ -e "$candidate" ]; then + camera="$candidate" + break + fi +done + +if [ -z "$camera" ]; then + echo "rqr: no camera found" >&2 + exit 1 +fi + +text="$(zbarcam -q -1 --raw "$camera")" printf '%s' "$text" | wl-copy echo "$text" -- cgit v1.3.1