Skip to content

Add OCR text capture from screen region#4614

Closed
emmgeede wants to merge 1 commit intobasecamp:masterfrom
emmgeede:feat/ocr-screenshot
Closed

Add OCR text capture from screen region#4614
emmgeede wants to merge 1 commit intobasecamp:masterfrom
emmgeede:feat/ocr-screenshot

Conversation

@emmgeede
Copy link
Copy Markdown

Summary

  • Adds omarchy-cmd-ocr, a CleanShot X-style OCR tool that lets you select a screen region and copies recognized text to clipboard
  • Two modes: formatted (preserves layout) and compact (single line, collapsed whitespace)
  • Uses tesseract for recognition with the same smart selection (windows + regions) as the regular screenshot tool

Changes

  • bin/omarchy-cmd-ocr — the OCR capture script
  • default/hypr/bindings/utilities.conf — keybindings added
  • install/omarchy-base.packages — adds tesseract + tesseract-data-eng

Bindings

Key Action
Ctrl+Print OCR text capture (keeps formatting)
Shift+Ctrl+Print OCR text capture (compact, single line)

How it works

  1. Screen freezes via wayfreeze
  2. Select a region or window with slurp (same smart selection as screenshots)
  3. grim captures the region, pipes to tesseract for OCR
  4. Recognized text is copied to clipboard via wl-copy
  5. A notification shows a preview of the captured text

Test plan

  • Ctrl+Print → select region with text → text appears in clipboard with original formatting
  • Shift+Ctrl+Print → same but line breaks removed, whitespace collapsed
  • Selecting a region with no text shows "No text recognized" notification
  • Pressing Escape during selection cancels cleanly

🤖 Generated with Claude Code

Select a screen region and copy recognized text to clipboard, like
CleanShot X OCR. Uses tesseract for recognition with the same smart
selection (windows + regions) as the regular screenshot tool.

Binding: Ctrl+Print

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@emmgeede
Copy link
Copy Markdown
Author

I will create an AUR for this. omarchy-cmd-ocr

@emmgeede emmgeede closed this Feb 17, 2026
@emmgeede
Copy link
Copy Markdown
Author

Created an AUR package for this: omarchy-cmd-ocr

yay -S omarchy-cmd-ocr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant