1
0
Fork 0

move grimsatty to folder in ${PATH}

This commit is contained in:
tastytea 2024-01-14 18:04:58 +01:00
parent d4d4f6f642
commit 6778c34647
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 2 additions and 1 deletions

View File

@ -3,10 +3,11 @@
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
local what=${1:-area}
local tmpfile="$(mktemp --suffix='.grimsatty.png')"
local outfile="$(xdg-user-dir PICTURES)"/screenshots/$(date +screenshot_%FT%R:%S.webp)
grimshot save area - \
grimshot save ${what} - \
| satty --filename - --output-filename ${tmpfile} --early-exit
cwebp -z 9 -m 6 -lossless -short ${tmpfile} -o ${outfile}
rm ${tmpfile}