mirror of
https://github.com/swaywm/sway.git
synced 2024-11-10 12:33:50 +01:00
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:
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…
Reference in New Issue
Block a user