A PowerToys Text Extractor alternative for Linux, designed for Hyprland (Arch Linux). Capture a screen region, extract text using Tesseract OCR, and copy it to your clipboard—all in one go! No more saving images just to extract text. 🎉
✅ Inspired by PowerToys – Bring Windows-like text extraction to Linux 🐧
✅ One-Click Workflow – Capture, extract, and copy text instantly 📜✨
✅ Clipboard Integration – Automatically copies text to your clipboard 🔗
✅ Temporary Files – Screenshots are auto-deleted for a clean workspace 🧹
✅ Lightweight & Fast – Minimal dependencies, maximum efficiency ⚡
Ensure these packages are installed:
sudo pacman -S --needed tesseract tesseract-data-eng grim slurp wl-clipboardgit clone https://github.com/TheBrightSoul/Screen-Text-Reader
cd Screen-Text-Readerchmod +x ocr-screenshot.shsudo mv ocr-screenshot.sh /usr/local/bin/ocr-screenshotRun the script:
./ocr-screenshot.shOr, if moved to /usr/local/bin/:
ocr-screenshotSelect a screen region, and the extracted text will be copied to your clipboard. 🎉
1️⃣ Capture: Uses grim and slurp to select and capture a screen region. 🖼️
2️⃣ Extract: Runs tesseract OCR to extract text from the screenshot. 🔎
3️⃣ Copy: Sends the extracted text to your clipboard using wl-copy. 📋
4️⃣ Cleanup: Deletes the temporary screenshot automatically. 🧹
Add this to your Hyprland configuration file (~/.config/hypr/hyprland.conf) to set a keybind:
bind = SUPER SHIFT, T, exec, /path/to/ocr-screenshot.shReplace /path/to/ocr-screenshot.sh with the actual path to the script. For example:
- If you moved it to
/usr/local/bin/, use:bind = SUPER SHIFT, T, exec, ocr-screenshot - If it's in your home directory, use:
bind = SUPER SHIFT, T, exec, ~/Screen-Text-Reader/ocr-screenshot.sh
Now, press SUPER + SHIFT + T to trigger the text extraction tool! 🎮
- Change OCR Language: Modify the script to use a different Tesseract language pack (e.g.,
tesseract-data-frafor French). - Debugging: Temporary files are stored in
/tmp/if you need to inspect them.