grimshot: Avoid screenshots overwriting each other

Due to the date format used, if several screenshots are taken in
succession, each one overwrote the other.

This change set makes each one have a different name to avoid this.

Also avoid using spaces, since many scripts and tools are unhappy with
file names with spaces.
This commit is contained in:
Hugo Osvaldo Barrera 2020-05-01 10:55:17 +02:00 committed by Drew DeVault
parent dce8abcdab
commit 61d59180b8

View File

@ -28,7 +28,7 @@ getTargetDirectory() {
ACTION=${1:-usage}
SUBJECT=${2:-screen}
FILE=${3:-$(getTargetDirectory)/$(date +'Grimshot %Y-%m-%d %H-%M-%S.png')}
FILE=${3:-$(getTargetDirectory)/$(date -Ins).png}
if [ "$ACTION" = "usage" ] ; then
echo "Usage:"