diff options
| author | Robert Günzler <r@gnzler.io> | 2020-06-24 12:28:35 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2020-06-24 12:28:35 +0200 |
| commit | 5129125aad6ef6495848464a93715ab3a4716418 (patch) | |
| tree | c2b852f6b9bdaa914d60d6e9179960a7e978e47e | |
| parent | 76788d739e5552c974dd29b6c767a980e3ea1dd1 (diff) | |
bin/grimshot: add option to select output
depends on bin/swq
| -rwxr-xr-x | bin/grimshot | 7 |
1 files changed, 6 insertions, 1 deletions
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 |