forked from Shinonome/dots-hyprland
add fallback script for google lens keybind
This commit is contained in:
@@ -61,8 +61,9 @@ bindd = Super, Period, Copy an emoji, exec, qs -c $qsConfig ipc call TEST_ALIVE
|
||||
bind = Super+Shift, S, global, quickshell:regionScreenshot # Screen snip
|
||||
bind = Super+Shift, S, exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || hyprshot --freeze --clipboard-only --mode region --silent # [hidden] Screen snip (fallback)
|
||||
bind = Super+Shift, A, global, quickshell:regionSearch # Google Lens
|
||||
bind = Super+Shift, A, exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || ~/.config/hypr/hyprland/scripts/snip_to_search.sh # [hidden] Google Lens (fallback)
|
||||
# OCR
|
||||
bindd = Super+Shift, T, Character recognition,exec,grim -g "$(slurp $SLURP_ARGS)" "tmp.png" && tesseract "tmp.png" - | wl-copy && rm "tmp.png" # [hidden]
|
||||
bind = Super+Shift, T,exec,grim -g "$(slurp $SLURP_ARGS)" "/tmp/ocr_image.png" && tesseract "/tmp/ocr_image.png" - | wl-copy && rm "/tmp/ocr_image.png" # [hidden]
|
||||
# Color picker
|
||||
bindd = Super+Shift, C, Color picker, exec, hyprpicker -a # Pick color (Hex) >> clipboard
|
||||
# Fullscreen screenshot
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
grim -g "$(slurp)" /tmp/image.png
|
||||
imageLink=$(curl -sF files[]=@/tmp/image.png 'https://uguu.se/upload' | jq -r '.files[0].url')
|
||||
xdg-open "https://lens.google.com/uploadbyurl?url=${imageLink}"
|
||||
rm /tmp/image.png
|
||||
Reference in New Issue
Block a user