Just wondering since I know a lot of people quietly use a screen-area-select -> tesseract OCR -> clipboard shortcut.

  • I separate subjects of interest into different Firefox windows, in different workspaces – so I have an extension title them and a startup script parse text to ask the compositor to put them in the correct workspace (lets me restart more conveniently).
  • I have automatically-set different-orientation wallpapers for using my 2-in-1 depending on whether I use it in portrait or landscape (kind of just for looks, but I don’t think if anyone else adds a wallpaper change to their screen rotation keybind).
    • fool@discuss.tchncs.deOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      8 hours ago

      I think I mentioned it but here it is again in case the comment didnt federate

      click to enlarge
      # snippet based on end4 dotfiles -- FIXME edge case where a
      #     preexisting tmp.png might be overwritten
      # English
      bind = Super+Shift,T,exec,grim -g "$(slurp $SLURP_ARGS)" "tmp.png" && tesseract -l eng "tmp.png" - | wl-copy && rm "tmp.png"
      # Korean
      bind = Super+Shift,K,exec,grim -g "$(slurp $SLURP_ARGS)" "tmp.png" && tesseract -l kor "tmp.png" - | wl-copy && rm "tmp.png"
      # Japanese
      bind = Super+Shift,J,exec,grim -g "$(slurp $SLURP_ARGS)" "tmp.png" && tesseract -l jpn "tmp.png" - | wl-copy && rm "tmp.png"
      

      Pipe grim and slurp (selects part of the Wayland screen then copies) into a tmp.png, tesseract it into the clipboard, then delete the tmp.png. Has like 1 sec of lag tho :]

      • Kanedias@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        6 hours ago

        why do you even need a temporary file?

        $ slurp | grim -g - - | tesseract stdin stdout -l eng+kor+jpn | wl-copy -t 'text/plain'