feat(hyprland): add OCR bind (SUPER+ALT+E) and remove TODO

This commit is contained in:
kenji
2026-01-18 10:33:37 -06:00
parent dccc191c24
commit 8a7b475562
2 changed files with 8 additions and 2 deletions
-1
View File
@@ -49,7 +49,6 @@
# "SUPER, SPACE, Open App Launcher, exec, nc -U $XDG_RUNTIME_DIR/walker/walker.sock" # "SUPER, SPACE, Open App Launcher, exec, nc -U $XDG_RUNTIME_DIR/walker/walker.sock"
# TODO: # TODO:
# add text clipping from pictures
# add screen recording # add screen recording
# Special workspace # Special workspace
+8 -1
View File
@@ -27,8 +27,13 @@
wl-copy < "$filepath" wl-copy < "$filepath"
notify-send "Screenshot saved" "Saved and copied to clipboard" notify-send "Screenshot saved" "Saved and copied to clipboard"
;; ;;
ocr)
# OCR Selection
grim -g "$(slurp)" - | tesseract stdin stdout | wl-copy
notify-send "OCR" "Text extracted to clipboard"
;;
*) *)
echo "Usage: screenshot {region|window|screen|all|region-save}" echo "Usage: screenshot {region|window|screen|all|region-save|ocr}"
exit 1 exit 1
;; ;;
esac esac
@@ -40,6 +45,7 @@ in {
swappy # Annotation tool swappy # Annotation tool
jq # For window selection jq # For window selection
wl-clipboard # For copying to clipboard wl-clipboard # For copying to clipboard
tesseract # OCR tool
screenshot # Our wrapper script screenshot # Our wrapper script
]; ];
@@ -66,5 +72,6 @@ in {
"SUPER SHIFT, S, Screenshot Active Window, exec, screenshot window" "SUPER SHIFT, S, Screenshot Active Window, exec, screenshot window"
"SUPER ALT, S, Quick Screenshot (no edit), exec, screenshot region-save" "SUPER ALT, S, Quick Screenshot (no edit), exec, screenshot region-save"
"SUPER ALT SHIFT, S, Screenshot Current Monitor, exec, screenshot screen" "SUPER ALT SHIFT, S, Screenshot Current Monitor, exec, screenshot screen"
"SUPER ALT, E, OCR Selection, exec, screenshot ocr"
]; ];
} }