#!/bin/sh
# mood-screenshot full|area — saves to ~/Pictures/Screenshots and copies to the clipboard.
dir="$(xdg-user-dir PICTURES 2>/dev/null || echo "$HOME/Pictures")/Screenshots"
mkdir -p "$dir"
f="$dir/Screenshot $(date '+%Y-%m-%d %H.%M.%S').png"
if [ "$1" = "area" ]; then
  g="$(slurp -b 00000066 -c 8b5cf6ff -s 8b5cf622 -w 2)" || exit 0
  sleep 0.1; grim -g "$g" "$f" || exit 1
else
  sleep 0.2; grim "$f" || exit 1
fi
wl-copy --type image/png < "$f"
notify-send -a Screenshot -i "$f" "Screenshot saved" "Copied to clipboard · Pictures/Screenshots"
