this post was submitted on 14 Apr 2025
13 points (88.2% liked)

Linux

2469 readers
1 users here now

founded 2 years ago
MODERATORS
 

Just thought I'd throw these out there, somebody might like them. There are a lot of different ways of getting the same result.

Screenshot (I shortcut it to F6):

maim --select | xclip -selection primary -t image/png

One key and then I just select the screen shot and middle-click to paste the image where I want it.

OCR a screenshot (I shortcut it to ctrl-F6)

TMPFILE=$(mktemp);maim --select $TMPFILE.png ; tesseract $TMPFILE.png $TMPFILE ; xclip -sel primary $TMPFILE.txt

This may be a little messy as a forced one-liner. This way I can select text from an image on screen, and have the OCR'd text available with, again, my middle click.

Should go without saying it uses maim and tesseract, both should be available with your package manager of choice, and there are alternatives to both of those utilities.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here