#!/bin/bash set -Eeuo pipefail RES="$(slurp | grim -g - - | gazou | sed -n '2p')" # Truncate RES for display if it's longer than 100 characters DISPLAY_RES="${RES:0:100}" if [ ${#RES} -gt 100 ]; then DISPLAY_RES="${DISPLAY_RES}..." fi notify-send "ocr.sh" "Text: $DISPLAY_RES" echo "$RES" | wl-copy