diff options
Diffstat (limited to 'contrib/grimshot')
-rwxr-xr-x | contrib/grimshot | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/grimshot b/contrib/grimshot index 461a5eef..4ce31f29 100755 --- a/contrib/grimshot +++ b/contrib/grimshot | |||
@@ -32,13 +32,13 @@ FILE=${3:-$(getTargetDirectory)/$(date -Ins).png} | |||
32 | 32 | ||
33 | if [ "$ACTION" != "save" ] && [ "$ACTION" != "copy" ] && [ "$ACTION" != "check" ]; then | 33 | if [ "$ACTION" != "save" ] && [ "$ACTION" != "copy" ] && [ "$ACTION" != "check" ]; then |
34 | echo "Usage:" | 34 | echo "Usage:" |
35 | echo " grimshot [--notify] (copy|save) [active|screen|output|area|window] [FILE]" | 35 | echo " grimshot [--notify] (copy|save) [active|screen|output|area|window] [FILE|-]" |
36 | echo " grimshot check" | 36 | echo " grimshot check" |
37 | echo " grimshot usage" | 37 | echo " grimshot usage" |
38 | echo "" | 38 | echo "" |
39 | echo "Commands:" | 39 | echo "Commands:" |
40 | echo " copy: Copy the screenshot data into the clipboard." | 40 | echo " copy: Copy the screenshot data into the clipboard." |
41 | echo " save: Save the screenshot to a regular file." | 41 | echo " save: Save the screenshot to a regular file or '-' to pipe to STDOUT." |
42 | echo " check: Verify if required tools are installed and exit." | 42 | echo " check: Verify if required tools are installed and exit." |
43 | echo " usage: Show this message and exit." | 43 | echo " usage: Show this message and exit." |
44 | echo "" | 44 | echo "" |
@@ -113,7 +113,7 @@ elif [ "$SUBJECT" = "area" ] ; then | |||
113 | GEOM=$(slurp -d) | 113 | GEOM=$(slurp -d) |
114 | # Check if user exited slurp without selecting the area | 114 | # Check if user exited slurp without selecting the area |
115 | if [ -z "$GEOM" ]; then | 115 | if [ -z "$GEOM" ]; then |
116 | exit | 116 | exit 1 |
117 | fi | 117 | fi |
118 | WHAT="Area" | 118 | WHAT="Area" |
119 | elif [ "$SUBJECT" = "active" ] ; then | 119 | elif [ "$SUBJECT" = "active" ] ; then |
@@ -132,7 +132,7 @@ elif [ "$SUBJECT" = "window" ] ; then | |||
132 | GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp) | 132 | GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp) |
133 | # Check if user exited slurp without selecting the area | 133 | # Check if user exited slurp without selecting the area |
134 | if [ -z "$GEOM" ]; then | 134 | if [ -z "$GEOM" ]; then |
135 | exit | 135 | exit 1 |
136 | fi | 136 | fi |
137 | WHAT="Window" | 137 | WHAT="Window" |
138 | else | 138 | else |