summaryrefslogtreecommitdiffstatshomepage
path: root/dot_local/bin/executable_ocr
diff options
context:
space:
mode:
authorsommerfeld <sommerfeld@sommerfeld.dev>2026-09-17 15:05:36 +0100
committersommerfeld <sommerfeld@sommerfeld.dev>2026-09-17 15:05:36 +0100
commitaff435a0fb3a56b1d7b738c7dede363440884b3a (patch)
tree07acb41d37760aa169ee42dbeb69da3621cc7489 /dot_local/bin/executable_ocr
parenta7f74c1fa4b89c5829f5896842eb7248c820704c (diff)
downloaddotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.tar.gz
dotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.tar.bz2
dotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.zip
Add the Canonical laptop profile and setup workflows
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