2020-06-30 22:21:39 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
# makes a selection screenshot and prints out the filename in a date format
|
|
|
|
# not intended for direct use. Dosn't remove tmp dir
|
|
|
|
# required packages:
|
|
|
|
# - deepin-screenshot
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
TMPDIR=$(mktemp -d)
|
|
|
|
|
2023-10-17 22:37:29 +00:00
|
|
|
cd $TMPDIR
|
|
|
|
|
|
|
|
grim -g "$(slurp)"
|
2020-06-30 22:21:39 +00:00
|
|
|
|
|
|
|
filename="$(date +"%d-%m-%y-%H-%M-%Z").png"
|
|
|
|
|
|
|
|
mv $TMPDIR/* "$TMPDIR/$filename"
|
|
|
|
|
2020-07-14 16:58:37 +00:00
|
|
|
printf "%s\n" "$TMPDIR/$filename"
|
2020-06-30 22:21:39 +00:00
|
|
|
|