22 lines
No EOL
614 B
Bash
Executable file
22 lines
No EOL
614 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 -g "$(slurp -o -r -c '#ff0000ff')" -t ppm - | \
|
|
satty --filename - \
|
|
--fullscreen \
|
|
--initial-tool crop \
|
|
--output-filename "$FILENAME" \
|
|
--disable-notifications \
|
|
--early-exit
|
|
|
|
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 |