From 6778c3464730e691774c37c42962fe9ca956ae1f Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 14 Jan 2024 18:04:58 +0100 Subject: [PATCH] move grimsatty to folder in ${PATH} --- {.config/zsh/functions => .local/bin}/grimsatty | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename {.config/zsh/functions => .local/bin}/grimsatty (89%) diff --git a/.config/zsh/functions/grimsatty b/.local/bin/grimsatty similarity index 89% rename from .config/zsh/functions/grimsatty rename to .local/bin/grimsatty index 97b044b..169da64 100755 --- a/.config/zsh/functions/grimsatty +++ b/.local/bin/grimsatty @@ -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}