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.
master
Hugo Osvaldo Barrera 5 years ago committed by Drew DeVault
parent dce8abcdab
commit 61d59180b8

@ -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:"

Loading…
Cancel
Save