summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2020-05-01 10:55:17 +0200
committerFurkan Sahin <furkan-dev@proton.me>2020-05-01 10:55:17 +0200
commit2b7aed34f2434cc4088b42622505b1ce7e39cba7 (patch)
treebd53c53c82070dd4bb069364120c901c6fdacd94
parent89e0f6202144fccece5a064261ffe57c2dbcc8ad (diff)
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.
-rwxr-xr-xcontrib/grimshot2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/grimshot b/contrib/grimshot
index 3ef18ce6..028fd935 100755
--- a/contrib/grimshot
+++ b/contrib/grimshot
@@ -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:"