summaryrefslogtreecommitdiff
path: root/.local/bin/maimshot
diff options
context:
space:
mode:
authorkrolxon <krolyxon@tutanota.com>2025-08-03 21:29:53 +0530
committerkrolxon <krolyxon@tutanota.com>2025-08-03 21:29:53 +0530
commit3718ac5eb3aae770e0b50e44b514c276376f1bcf (patch)
tree9db1e5af4964e6b1e03f0ecf79f18a8d9de87491 /.local/bin/maimshot
parent216cf47a22e69ec42ba26118dc92154d5ef95862 (diff)
move to hyprland
Diffstat (limited to '.local/bin/maimshot')
-rwxr-xr-x.local/bin/maimshot13
1 files changed, 0 insertions, 13 deletions
diff --git a/.local/bin/maimshot b/.local/bin/maimshot
deleted file mode 100755
index db4780c..0000000
--- a/.local/bin/maimshot
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-ocr_cmd="xclip -sel clip"
-
-case "$(printf "a selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)\\na selected area\\ncurrent window\\nfull screen\\na selected area (OCR)" | dmenu -l 7 -i -p "Screenshot which area?")" in
- "a selected area (copy)") maim -u -s | xclip -selection clipboard -t image/png ;;
- "current window (copy)") maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;;
- "full screen (copy)") sleep 0.2 ; maim | xclip -selection clipboard -t image/png ;;
- "a selected area") maim -u -s ~/pix/ss/pic-selected-$(uuidgen | awk -F- '{printf $2}')-"$(date '+%y-%m-%d').png" ;;
- "current window") maim -i "$(xdotool getactivewindow)" ~/pix/ss/pic-window-"$(uuidgen | awk -F- '{printf $2}')-$(date '+%y-%m-%d').png" ;;
- "full screen") sleep 0.2 ; maim ~/pix/ss/pic-full-"$(uuidgen | awk -F- '{printf $2}')-$(date '+%y-%m-%d').png" ;;
- "a selected area (OCR)") tmpfile=$(mktemp /tmp/ocr-XXXXXX.png) && maim -u -s > "$tmpfile" && tesseract "$tmpfile" - -l eng | ${ocr_cmd} && rm "$tmpfile" ;;
-esac