infra/dotfile/.config/screenshot-script/wayland-screenshot-full.sh
2025-12-05 16:06:19 +07:00

16 lines
No EOL
419 B
Bash
Executable file

#!/bin/sh
mkdir -p ~/resource/screenshot
TIMESTAMP=$(date '+%Y-%m-%d_%H-%M-%S')
FILENAME="$HOME/resource/screenshot/screenshot_${TIMESTAMP}.png"
grim "$FILENAME"
if [ -f "$FILENAME" ]; then
wl-copy < "$FILENAME"
notify-send "Screenshot" \
"Saved & copied:\n$(basename "$FILENAME")\nGoshujin-sama!" \
-i "$FILENAME"
else
notify-send "Screenshot" "Not saved!" -u critical
fi