aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Hugo Osvaldo Barrera <hugo@barrera.io>2020-05-01 10:55:17 +0200
committerLibravatar Drew DeVault <sir@cmpwn.com>2020-05-05 20:18:19 +0200
commit61d59180b875573f8fa42e084d8e66a6b12b61f3 (patch)
treebd53c53c82070dd4bb069364120c901c6fdacd94 /contrib
parentgrimshot: Allow configuring default directory (diff)
downloadsway-61d59180b875573f8fa42e084d8e66a6b12b61f3.tar.gz
sway-61d59180b875573f8fa42e084d8e66a6b12b61f3.tar.zst
sway-61d59180b875573f8fa42e084d8e66a6b12b61f3.zip
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.
Diffstat (limited to 'contrib')
-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() {
28 28
29ACTION=${1:-usage} 29ACTION=${1:-usage}
30SUBJECT=${2:-screen} 30SUBJECT=${2:-screen}
31FILE=${3:-$(getTargetDirectory)/$(date +'Grimshot %Y-%m-%d %H-%M-%S.png')} 31FILE=${3:-$(getTargetDirectory)/$(date -Ins).png}
32 32
33if [ "$ACTION" = "usage" ] ; then 33if [ "$ACTION" = "usage" ] ; then
34 echo "Usage:" 34 echo "Usage:"