updated screenshot tools
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user