grimshot: document support for piping to STDOUT.

This commit is contained in:
Mark Stosberg 2021-02-23 10:20:45 -05:00 committed by Simon Ser
parent aac1582ea9
commit 8f2eeae285
3 changed files with 5 additions and 3 deletions

View File

@ -32,13 +32,13 @@ FILE=${3:-$(getTargetDirectory)/$(date -Ins).png}
if [ "$ACTION" != "save" ] && [ "$ACTION" != "copy" ] && [ "$ACTION" != "check" ]; then if [ "$ACTION" != "save" ] && [ "$ACTION" != "copy" ] && [ "$ACTION" != "check" ]; then
echo "Usage:" echo "Usage:"
echo " grimshot [--notify] (copy|save) [active|screen|output|area|window] [FILE]" echo " grimshot [--notify] (copy|save) [active|screen|output|area|window] [FILE|-]"
echo " grimshot check" echo " grimshot check"
echo " grimshot usage" echo " grimshot usage"
echo "" echo ""
echo "Commands:" echo "Commands:"
echo " copy: Copy the screenshot data into the clipboard." echo " copy: Copy the screenshot data into the clipboard."
echo " save: Save the screenshot to a regular file." echo " save: Save the screenshot to a regular file or '-' to pipe to STDOUT."
echo " check: Verify if required tools are installed and exit." echo " check: Verify if required tools are installed and exit."
echo " usage: Show this message and exit." echo " usage: Show this message and exit."
echo "" echo ""

View File

@ -5,7 +5,7 @@
.nh .nh
.ad l .ad l
.\" Begin generated content: .\" Begin generated content:
.TH "grimshot" "1" "2020-12-20" .TH "grimshot" "1" "2021-02-23"
.P .P
.SH NAME .SH NAME
.P .P
@ -31,6 +31,7 @@ Show notifications to the user that a screenshot has been taken.\&
Save the screenshot into a regular file.\& Grimshot will write images Save the screenshot into a regular file.\& Grimshot will write images
files to \fBXDG_SCREENSHOTS_DIR\fR if this is set (or defined files to \fBXDG_SCREENSHOTS_DIR\fR if this is set (or defined
in \fBuser-dirs.\&dir\fR), or otherwise fall back to \fBXDG_PICTURES_DIR\fR.\& in \fBuser-dirs.\&dir\fR), or otherwise fall back to \fBXDG_PICTURES_DIR\fR.\&
Set FILE to '-' to pipe the output to STDOUT.\&
.P .P
.RE .RE
\fBcopy\fR \fBcopy\fR

View File

@ -19,6 +19,7 @@ grimshot - a helper for screenshots within sway
Save the screenshot into a regular file. Grimshot will write images Save the screenshot into a regular file. Grimshot will write images
files to *XDG_SCREENSHOTS_DIR* if this is set (or defined files to *XDG_SCREENSHOTS_DIR* if this is set (or defined
in *user-dirs.dir*), or otherwise fall back to *XDG_PICTURES_DIR*. in *user-dirs.dir*), or otherwise fall back to *XDG_PICTURES_DIR*.
Set FILE to '-' to pipe the output to STDOUT.
*copy* *copy*
Copy the screenshot data (as image/png) into the clipboard. Copy the screenshot data (as image/png) into the clipboard.