diff --git a/wayland-screenshot.sh b/wayland-screenshot.sh index 7f67b68..6bb989d 100755 --- a/wayland-screenshot.sh +++ b/wayland-screenshot.sh @@ -2,7 +2,6 @@ local resp="$(fuzzel --index -d <<'EOF' Whole screen -Current window Selected area Copy text with OCR (English) Copy text with OCR (Japanese) @@ -28,24 +27,17 @@ case "${resp}" in grim "${outfile}" ;; 1) - local active_window="$(hyprctl -j activewindow)" - [[ activewindow == '{}' ]] || - jq -r --null-input --argjson 'window' "${active_window}" \ - '$window | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | - grim -g - "${outfile}" - ;; - 2) local area="$(slurp 2>&1)" [[ "${area}" == 'selection cancelled' ]] || grim -g "${area}" "${outfile}" ;; - 3) + 2) copy_with_ocr eng ;; - 4) + 3) copy_with_ocr jpn ;; - 5) + 4) local color="$(hyprpicker -f hex -n -r)" (( ${#color} == 0 )) && exit wl-copy "${color}"