From ecce69cad2dfdbb18035cb5321275ef10bb7a748 Mon Sep 17 00:00:00 2001 From: Joakim Hulthe Date: Mon, 15 May 2023 10:10:21 +0200 Subject: [PATCH] scap: Don't run if scap is already running --- tree/.local/bin/scap | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tree/.local/bin/scap b/tree/.local/bin/scap index 377b369..ab3f8b9 100755 --- a/tree/.local/bin/scap +++ b/tree/.local/bin/scap @@ -5,6 +5,11 @@ if [ "$XDG_SESSION_TYPE" != "wayland" ]; then exit 1 fi +if ps -e | grep "slurp"; then + echo "slurp is already running" + exit 1 +fi + DIMS="$(slurp)" grim -g "$DIMS" - | pbc