add function for taking screenshots in wlroots wayland
This commit is contained in:
parent
2f43a1c67c
commit
e63084441b
12
.config/zsh/functions/grimsatty
Executable file
12
.config/zsh/functions/grimsatty
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
# take screenshot with grimshot, annotate with satty, convert with cwebp
|
||||||
|
|
||||||
|
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
|
||||||
|
|
||||||
|
local tmpfile="$(mktemp --suffix='.grimsatty.png')"
|
||||||
|
local outfile="$(xdg-user-dir PICTURES)"/screenshots/$(date +screenshot_%FT%R:%S.webp)
|
||||||
|
|
||||||
|
grimshot save area - \
|
||||||
|
| satty --filename - --output-filename ${tmpfile} --early-exit
|
||||||
|
cwebp -z 9 -m 6 -lossless -short ${tmpfile} -o ${outfile}
|
||||||
|
rm ${tmpfile}
|
Loading…
x
Reference in New Issue
Block a user