Advertisement
Guest User

fmenu-pics

a guest
Sep 18th, 2021
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.65 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. fm_text_search(){
  4.   ocr_pic "$*"
  5.   operation="$(fzf --layout=reverse --header="${*##*/}" --header-lines=1 <<< '
  6. 🔍 search text
  7. 🖊  edit text
  8. 🌓 convert format
  9. 📎 send to
  10. ℑ𝖉 style
  11. ✅ Done')"
  12. }
  13.  
  14. while [ ! "$finished" ]; do
  15.  
  16. operation="$(fzf --layout=reverse --header="${*##*/}" --header-lines=1 <<< '
  17. 💫 quick edit
  18. 🔳 copy image
  19. 👣 copy path
  20. 💬 copy image text
  21. 🐶 Gimp
  22. 🎨 Krita
  23. 🎩 convert format
  24. 📜 print
  25. 🔬 search by image
  26. 📎 send (generic)
  27. 💌 send (image)
  28. Æ▫ steg
  29. 😎 filter
  30. ✅ Done')"
  31.  
  32. operation="${operation:-"✅ Done"}"
  33.  
  34. case "$operation" in
  35.   *" quick edit"     )   ksnip --edit                                         "$*" ;;
  36.   *" Gimp"           )   gimp                                          --     "$*" ;;
  37.   *" Krita"          )   krita                                         --     "$*" ;;
  38.   *" copy image"     )   copyq  write image/png -                      --   < "$*" ;;
  39.   *" copy path"      )   xsel --primary     <<< "$*"; xsel --clipboard    <<< "$*" ;;
  40.   *" copy image text")   ocr_pic                                              "$*" ;;
  41.   *" convert format" )   ~/.local/bin/scripts/fmenu-pics-convert              "$*" ;;
  42.   *" print"          )   ~/.local/bin/scripts/fmenu-quickprint                "$*" ;;
  43.   *" send (generic)" )   ~/.local/bin/scripts/fmenu-send-regular              "$*" ;;
  44.   *" filter"         )   ~/.local/bin/scripts/fmenu-pics-filter               "$*" ;;
  45.   *" search by image")   google_image_search                                  "$*" ;;
  46.   *" Done"           )   finished=true                                             ;;
  47. esac; done
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement