From 8f7364fb04e693cfc3cecc5c583d89a749bcc204 Mon Sep 17 00:00:00 2001 From: SuperSamus <40663462+SuperSamus@users.noreply.github.com> Date: Mon, 8 Nov 2021 16:07:59 +0100 Subject: [PATCH] grimshot: Check if an instance is already running --- contrib/grimshot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/grimshot b/contrib/grimshot index 4ce31f29f..670942184 100755 --- a/contrib/grimshot +++ b/contrib/grimshot @@ -109,6 +109,9 @@ if [ "$ACTION" = "check" ] ; then check jq check notify-send exit +elif [ "$(pgrep -u $USER grimshot)" != $$ ]; then + echo "An instance is already running" + exit 1 elif [ "$SUBJECT" = "area" ] ; then GEOM=$(slurp -d) # Check if user exited slurp without selecting the area