From 5129125aad6ef6495848464a93715ab3a4716418 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Wed, 24 Jun 2020 12:28:35 +0200 Subject: bin/grimshot: add option to select output depends on bin/swq --- bin/grimshot | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/grimshot b/bin/grimshot index e532e0a..08ad03d 100755 --- a/bin/grimshot +++ b/bin/grimshot @@ -25,7 +25,7 @@ FILE=${3:-$(xdg-user-dir PICTURES)/screenshots/$(now).png} case "$ACTION" in usage|help|-h|--help) echo "Usage:" - echo " grimshot copy|save|rec win|screen|area [FILE]" + echo " grimshot copy|save|rec win|screen|area|output [FILE]" echo "Troubleshoot:" echo " grimshot check" exit @@ -93,6 +93,7 @@ if [ "$ACTION" = "check" ] ; then check slurp check wf-recorder check swaymsg + check swq check wl-copy check jq check notify-send @@ -109,6 +110,10 @@ elif [ "$SUBJECT" = "win" ] ; then elif [ "$SUBJECT" = "screen" ] ; then GEOM="" WHAT="Screen" +elif [ "$SUBJECT" = "output" ] ; then + GEOM="" + OUTPUT="$(swq current output)" + WHAT="$OUTPUT output" else die "Unknown subject to take a screen shot from" "$SUBJECT" fi -- cgit 1.4.1