mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-08 06:19:01 +00:00
![Gabriel Arazas](/assets/img/avatar_default.png)
I think this is better for separating modules explicitly. This is also considered as there are similar objects between modules (e.g., NixOS and home-manager modules and users). Revert users module to old position
20 lines
638 B
Bash
Executable File
20 lines
638 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# A script that utilizes OCR for a screenshot and copies the text to the clipboard.
|
|
|
|
# Dependencies:
|
|
# * tesseract 4.1.1
|
|
# * leptonica-1.79.0
|
|
# * The Tesseract English data
|
|
# * Image libraries (e.g., `libgif`, `libwebp`)
|
|
# * xclip - version 0.13
|
|
# * maim - version 5.6.3
|
|
|
|
# It's a small script anyways so why not.
|
|
# I feel like this is one of the appropriate solutions especially that there is potential for erreneous feedback.
|
|
set -o pipefail
|
|
|
|
notify-send "Select a region for the OCR"
|
|
maim --select --hidecursor | magick mogrify -modulate 100,0 -resize 400% png:- | tesseract - stdout | xclip -selection clipboard
|
|
|