From 24117cc6bef5eaecf142b25acc4b6ef229a688f7 Mon Sep 17 00:00:00 2001 From: graves501 Date: Wed, 24 Jan 2024 08:43:31 +0100 Subject: [PATCH] Fix wait check --- grimshot | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grimshot b/grimshot index 4ba6b3e..1fcdafb 100755 --- a/grimshot +++ b/grimshot @@ -126,6 +126,10 @@ takeScreenshot() { fi } +if [ "$WAIT" != "no" ]; then + sleep "$WAIT" +fi + if [ "$ACTION" = "check" ] ; then echo "Checking if required tools are installed. If something is missing, install it to your system and make it available in PATH..." check grim @@ -172,10 +176,6 @@ else die "Unknown subject to take a screen shot from" "$SUBJECT" fi -if [ "$WAIT" != "no" ]; then - sleep "$WAIT" -fi - if [ "$ACTION" = "copy" ] ; then takeScreenshot - "$GEOM" "$OUTPUT" | wl-copy --type image/png || die "Clipboard error" notifyOk "$WHAT copied to buffer"