updated screenshot tools

This commit is contained in:
Your Name
2026-08-14 12:18:37 +00:00
parent b5ce934840
commit 6a2a3ce6dd
4 changed files with 62 additions and 35 deletions
+8 -8
View File
@@ -1,14 +1,14 @@
#!/bin/bash
###
### ~/.config/hypr/scripts/screenshot/screenshot_area.sh
### ~/.config/hypr/scripts/screenshot/screenshot_area_2.sh
###
time=$(date +%Y-%m-%d-%I-%M-%S)
geometry=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | "\(.width)x\(.height)"')
dir="$(xdg-user-dir PICTURES)/Screenshots"
file="Screenshot_${time}_${geometry}.png"
# Select a region with slurp; exit silently if cancelled (ESC/right-click)
geometry=$(slurp) || exit 1
mkdir -p "$dir"
# Capture region and copy to clipboard only
grim -g "$geometry" - | wl-copy -t image/png
# Take screenshot of selected region using hyprshot
hyprshot -m region -o "$dir" -f "$file" --clipboard-only
if command -v notify-send >/dev/null 2>&1; then
notify-send -a Screenshot -i camera-photo "Screenshot copied to clipboard"
fi