Files
scripts-collection/mangowm/ss.sh
2026-04-05 01:14:21 +09:00

18 lines
415 B
Bash
Executable File

#!/bin/bash
MODE=${1:-area}
OUTPUT=~/pictures/$(date +"%Y-%m-%d_%H-%M-%S").png
case "$MODE" in
area)
grim -g "$(slurp)" - | satty --filename - --output-filename "$OUTPUT" --early-exit --copy-command wl-copy
;;
screen)
grim -g "$(slurp -o)" - | satty --filename - --output-filename "$OUTPUT" --early-exit --copy-command wl-copy
;;
*)
echo "Usage: $0 [area|screen]"
exit 1
;;
esac