Lightweight screen OCR tool for Linux (Wayland), built with PySide6 and Tesseract. Select a region of your screen and get the text out of it.
- Select any region of the screen and extract its text.
- Language list is built from the Tesseract language packs you have installed.
- Handy presets for mixed text: Japanese + English and Chinese Simplified + English.
- Adjustable Page Segmentation Mode (PSM) for different text layouts.
- Image preprocessing (grayscale, upscaling, contrast boost) for better accuracy.
- System tray icon with quick actions, plus a
Ctrl+Sshortcut for capturing. --captureflag to start a capture immediately on launch, handy for hotkeys.- OCR runs in a worker thread, so the UI never freezes while you select a region.
- The region is selected with
slurpand captured withgrim. - The image is preprocessed with Pillow.
- Tesseract extracts the text, which shows up in the window ready to copy.
slurp + grim is the main capture method. On KDE Plasma, grim does not work because of compositor protocol limitations, so the app falls back to Spectacle if it is installed. Spectacle is an optional fallback, not a dependency.
External tools are launched with a cleaned environment (LD_LIBRARY_PATH, QT_PLUGIN_PATH, etc. are removed). PyInstaller overrides these variables, which would otherwise break the external binaries when running a bundled build.
- GUI: PySide6 (Qt6)
- OCR: Tesseract via pytesseract
- Image processing: Pillow
- Screen capture: slurp + grim (Spectacle fallback)
- Linux with a Wayland session
- Python 3.10+
tesseractwith the language data packs you need (check withtesseract --list-langs)slurpandgrim- (Optional)
spectaclefor KDE Plasma
Download the pre-compiled Linux executable from the Releases page and run it directly. No Python or pip packages required, but you still need the system tools listed under Requirements (Tesseract, slurp and grim).
-
Clone the repository:
git clone https://github.com/FurkannAli/py-way-ocr.git cd py-way-ocr -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python src/main.py
Launch with --capture to jump straight into region selection. The result appears in the window, which you can open from the tray icon. Bind it in your compositor, for example:
# Sway
bindsym $mod+Shift+t exec python3 /path/to/py-way-ocr/src/main.py --capture
# Hyprland
bind = SUPER SHIFT, T, exec, python3 /path/to/py-way-ocr/src/main.py --captureTo compile a standalone single-file binary:
pip install pyinstaller
pyinstaller --onefile --noconsole --name=py-way-ocr src/main.pyThis project is a work in progress. Planned improvements:
- Copy the result automatically when launched with
--capture - Translation functionality
Distributed under the MIT License.

