grimshot: Check if an instance is already running

This commit is contained in:
SuperSamus 2021-11-08 16:07:59 +01:00 committed by Martino Fontana
parent fc25e4944e
commit 8f7364fb04

View file

@ -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