diff --git a/.scripts/ocr-screen.sh b/.scripts/ocr-screen.sh new file mode 100755 index 0000000..c4c9be8 --- /dev/null +++ b/.scripts/ocr-screen.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +text=$(grim -g "$(slurp)" - | tesseract stdin stdout -l eng 2>/dev/null) + +if [ -n "$text" ]; then + printf '%s' "$text" | wl-copy + notify-send "OCR" "Text copied to clipboard" +fi +