ocr Implementing fast OCR using scripts.

Essentially, this is an OCR that utilizes the built-in Preview function on Mac. We simply bind this operation to a keyboard shortcut, mouse gesture, or side button. Personally, I prefer using Shift + Cmd + Z because it's more comfortable for my fingers, especially since all four side buttons on my mouse are occupied. I'm considering getting a mouse with twelve side buttons, as clicking a side button is definitely more efficient than using the keyboard. My current approach is to use the mouse whenever possible to avoid the keyboard.

We just need to add the following shell script in BTT:

#!/usr/bin/env bash

# Capture screenshots in interactive mode and save them to a specified path.
screencapture -i /tmp/screenshot.png

# Open saved images using Quick Look
qlmanage -p /tmp/screenshot.png &>/dev/null