add:screenshot direct screen capture

This commit is contained in:
kokopi-dev
2026-03-18 17:26:55 +09:00
parent 95346911a8
commit 49881893bb
3 changed files with 22 additions and 3 deletions

View File

@@ -1,2 +1,17 @@
#!/bin/bash
grim -g "$(slurp)" - | satty --filename - --output-filename ~/pictures/ss/$(date +"%Y-%m-%d_%H-%M-%S").png --early-exit --copy-command wl-copy
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