mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-01-31 04:57:57 +00:00
0681d1fd7c
It's been a while but I've been using NixOS (or anything styled like it like GuixSD, for example) and distro-hopped from Arch Linux. I think it's high noon for making the structure of this setup to be truer to one of the big objectives which is how easy to transfer this between different setups. Which means I removed some things such as the package lists, systemd config files, and package manager-specific configs. While the solution is easy (which is to simply ignore the system-specific files) but I'm not going with the pragmatic solution not because I'm a dumbass but because I'm so smart that I want to create a challenge for myself to solve a puzzle on figuring out a way on how to structure my dotfiles. :) Such a productive use of my time, that's for sure.
20 lines
557 B
Bash
Executable File
20 lines
557 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 | tesseract - stdout
|
|
|