diff --git a/contrib/leanshot-hashed.sh b/contrib/leanshot-hashed.sh new file mode 100755 index 0000000..1413a52 --- /dev/null +++ b/contrib/leanshot-hashed.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -eu + +outdir=~/Pictures/Screenshots +mkdir -p "${outdir}" + +file=$(mktemp --suffix .png) +trap "rm \"${file}\"" EXIT + +leanshot -o "${file}" $@ + +out="${outdir}/$(sha1sum "${file}" | cut -d ' ' -f 1).png" +cp "${file}" "${out}" +echo "${out}"