#!/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