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
+12 -9
View File
@@ -3,17 +3,20 @@
### ~/.config/hypr/scripts/screenshot/screenshot_monitor.sh
###
time=$(date +%Y-%m-%d-%I-%M-%S)
geometry=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | "\(.width)x\(.height)"')
time=$(date +%Y-%m-%d-%H%M%S)
dir="$(xdg-user-dir PICTURES)/Screenshots"
file="Screenshot_${time}_${geometry}.png"
monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name')
[ -n "$monitor" ] || exit 1
file="Screenshot_${time}_${monitor}.png"
mkdir -p "$dir"
# Take screenshot of selected region using hyprshot
hyprshot -m output -o "$dir" -f "$file"
# Capture the focused monitor, save it and copy to clipboard
grim -o "$monitor" "$dir/$file" || exit 1
wl-copy -t image/png < "$dir/$file"
# Optional: open in swappy for annotation (since hyprshot doesn't pipe to swappy directly)
# if command -v swappy >/dev/null 2>&1; then
# swappy -f "$dir/$file"
# fi
if command -v notify-send >/dev/null 2>&1; then
notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file"
fi