From f93ebba897be044e6380ef499a9c59adc537fecb Mon Sep 17 00:00:00 2001 From: Ragnar Groot Koerkamp Date: Thu, 1 Jul 2021 20:55:05 +0200 Subject: [PATCH] Rename 'selection' to 'anything' --- contrib/grimshot | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/grimshot b/contrib/grimshot index e20c2480c..19ef4d7de 100755 --- a/contrib/grimshot +++ b/contrib/grimshot @@ -32,7 +32,7 @@ FILE=${3:-$(getTargetDirectory)/$(date -Ins).png} if [ "$ACTION" != "save" ] && [ "$ACTION" != "copy" ] && [ "$ACTION" != "check" ]; then echo "Usage:" - echo " grimshot [--notify] (copy|save) [active|screen|output|area|window|selection] [FILE|-]" + echo " grimshot [--notify] (copy|save) [active|screen|output|area|window|anything] [FILE|-]" echo " grimshot check" echo " grimshot usage" echo "" @@ -47,8 +47,8 @@ if [ "$ACTION" != "save" ] && [ "$ACTION" != "copy" ] && [ "$ACTION" != "check" echo " screen: All visible outputs." echo " output: Currently active output." echo " area: Manually select a region." - echo " window: Manually select a window." - echo " selection: Manually select an area, window, or output." + echo " window: Manually select an area or window." + echo " anything: Manually select an area, window, or output." exit fi @@ -136,13 +136,13 @@ elif [ "$SUBJECT" = "window" ] ; then exit 1 fi WHAT="Window" -elif [ "$SUBJECT" = "selection" ] ; then +elif [ "$SUBJECT" = "anything" ] ; then GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp -o) # Check if user exited slurp without selecting the area if [ -z "$GEOM" ]; then exit fi - WHAT="Selection" + WHAT="Anything" else die "Unknown subject to take a screen shot from" "$SUBJECT" fi