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-12-02 01:24:01 +00:00
|
|
|
GRIM_DEFAULT_DIR="$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
|
|
|
|