summaryrefslogtreecommitdiffstatshomepage
path: root/dot_local/bin/executable_ocr
diff options
context:
space:
mode:
Diffstat (limited to 'dot_local/bin/executable_ocr')
-rw-r--r--dot_local/bin/executable_ocr3
1 files changed, 3 insertions, 0 deletions
diff --git a/dot_local/bin/executable_ocr b/dot_local/bin/executable_ocr
index aeadb51..d770911 100644
--- a/dot_local/bin/executable_ocr
+++ b/dot_local/bin/executable_ocr
@@ -21,6 +21,9 @@ if [ "${1:-}" ]; then
}
text="$(tesseract "$1" - -l "$lang" 2>/dev/null || true)"
else
+ if [ "$(cat "$HOME/.config/dotfiles/role" 2>/dev/null)" = canonical ]; then
+ exec flatpak run com.github.dynobo.normcap
+ fi
region="$(slurp 2>/dev/null)" || exit 0
text="$(grim -g "$region" - | tesseract - - -l "$lang" 2>/dev/null || true)"
fi