diff --git a/apps/hyprland/hypr/binds.nix b/apps/hyprland/hypr/binds.nix index 026e4f2..07e6469 100644 --- a/apps/hyprland/hypr/binds.nix +++ b/apps/hyprland/hypr/binds.nix @@ -49,7 +49,6 @@ # "SUPER, SPACE, Open App Launcher, exec, nc -U $XDG_RUNTIME_DIR/walker/walker.sock" # TODO: - # add text clipping from pictures # add screen recording # Special workspace diff --git a/apps/screenshot/default.nix b/apps/screenshot/default.nix index 673bb0c..ef8cfcf 100644 --- a/apps/screenshot/default.nix +++ b/apps/screenshot/default.nix @@ -27,8 +27,13 @@ wl-copy < "$filepath" 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 ;; esac @@ -40,6 +45,7 @@ in { swappy # Annotation tool jq # For window selection wl-clipboard # For copying to clipboard + tesseract # OCR tool screenshot # Our wrapper script ]; @@ -66,5 +72,6 @@ in { "SUPER SHIFT, S, Screenshot Active Window, exec, screenshot window" "SUPER ALT, S, Quick Screenshot (no edit), exec, screenshot region-save" "SUPER ALT SHIFT, S, Screenshot Current Monitor, exec, screenshot screen" + "SUPER ALT, E, OCR Selection, exec, screenshot ocr" ]; }