19 lines
374 B
Bash
19 lines
374 B
Bash
|
#!/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)
|
||
|
|
||
|
deepin-screenshot -n -s "$TMPDIR" 2>/dev/null
|
||
|
|
||
|
filename="$(date +"%d-%m-%y-%H-%M-%Z").png"
|
||
|
|
||
|
mv $TMPDIR/* "$TMPDIR/$filename"
|
||
|
|
||
|
printf "$TMPDIR/$filename"
|
||
|
|