Major rewrite: switching back to Arch from NixOS

This commit is contained in:
ItsDrike 2024-10-02 14:37:28 +02:00
parent df585b737b
commit 254181c0fc
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
121 changed files with 5433 additions and 2371 deletions

View file

@ -0,0 +1,19 @@
#!/bin/bash
set -euo pipefail
id=$(tr -dc 'a-zA-Z0-9' </dev/urandom | fold -w 6 | head -n 1 || true)
echo "Image ID: $id"
echo "Taking screenshot..."
grim -g "$(slurp -w 0)" /tmp/ocr-"$id".png
echo "Running OCR..."
tesseract /tmp/ocr-"$id".png - | wl-copy
echo -en "File saved to /tmp/ocr-'$id'.png\n"
echo "Sending notification..."
notify-send "OCR " "Text copied!"
echo "Cleaning up..."
rm /tmp/ocr-"$id".png -vf