hyprdots

my dotfiles for hyprland
git clone https://git.awy.one/hyprdots.git
Log | Files | Refs | README | LICENSE

commit d468ff425d6dba3f431b05bfe247169d0521a8f2
parent 3cc1ed940fb4fad45ae6a1cb8b4137dec5322856
Author: awy <awy@awy.one>
Date:   Thu, 20 Mar 2025 15:19:36 +0300

maimpick

Diffstat:
M.local/bin/maimpick | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/.local/bin/maimpick b/.local/bin/maimpick @@ -10,15 +10,15 @@ wclip_cmd="wl-copy -t image/png" ocr_cmd="wl-copy" get_active_window() { - hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' + hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' } -case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)\\ncopy selected image to text" | bemenu -l 7 -i -p "Screenshot which area?")" in - "a selected area") geometry=$(slurp) && sleep 0.2 && grim -g "$geometry" pic-selected-"${output}" ;; - "current window") geometry=$(get_active_window) && sleep 0.2 && grim -g "$geometry" pic-window-"${output}" ;; - "full screen") geometry=$(slurp -o) && sleep 0.2 && grim -g "$geometry" pic-full-"${output}" ;; - "a selected area (copy)") geometry=$(slurp) && sleep 0.2 && grim -g "$geometry" - | ${wclip_cmd} ;; - "current window (copy)") geometry=$(get_active_window) && sleep 0.2 && grim -g "$geometry" - | ${wclip_cmd} ;; - "full screen (copy)") geometry=$(slurp -o) && sleep 0.2 && grim -g "$geometry" - | ${wclip_cmd} ;; - "copy selected image to text") tmpfile=$(mktemp /tmp/ocr-XXXXXX.png) && slurp | grim -g - - > "$tmpfile" && tesseract "$tmpfile" - -l eng | ${ocr_cmd} && rm "$tmpfile" ;; +case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)\\ncopy selected image to text" | wmenu -N 2e3440 -n d8dee9 -S eacb8a -s 3b4252 -M eacb8a -m 3b4252 -f "monospace 12" -l 7 -i -p "Screenshot which area?")" in + "a selected area") geometry=$(slurp) && sleep 0.2 && grim -g "$geometry" pic-selected-"${output}" ;; + "current window") geometry=$(get_active_window) && sleep 0.2 && grim -g "$geometry" pic-window-"${output}" ;; + "full screen") geometry=$(slurp -o) && sleep 0.2 && grim -g "$geometry" pic-full-"${output}" ;; + "a selected area (copy)") geometry=$(slurp) && sleep 0.2 && grim -g "$geometry" - | ${wclip_cmd} ;; + "current window (copy)") geometry=$(get_active_window) && sleep 0.2 && grim -g "$geometry" - | ${wclip_cmd} ;; + "full screen (copy)") geometry=$(slurp -o) && sleep 0.2 && grim -g "$geometry" - | ${wclip_cmd} ;; + "copy selected image to text") tmpfile=$(mktemp /tmp/ocr-XXXXXX.png) && slurp | grim -g - - > "$tmpfile" && tesseract "$tmpfile" - -l eng | ${ocr_cmd} && rm "$tmpfile" ;; esac