From 0cebde4ea68771a1b50981b6247aed62f20d132a Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Mon, 12 Oct 2015 21:43:15 +0200 Subject: [PATCH] tried to prevent multi i3lock --- bspwm/.config/scripts/blurlock.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bspwm/.config/scripts/blurlock.sh b/bspwm/.config/scripts/blurlock.sh index 439db91..c3743b9 100755 --- a/bspwm/.config/scripts/blurlock.sh +++ b/bspwm/.config/scripts/blurlock.sh @@ -9,4 +9,10 @@ #convert -brightness-contrast -50x-40 $TMP $TMP #scrot $TMP -e 'convert -resize 20% -fill "#282828" -colorize 50% -blur 0x1 -resize 500% $f '"$TMP" #convert -gravity Center -composite $TMP ~/.config/lock.png $TMP + +if [ -n "$(pgrep i3lock)" ]; then + echo "i3lock already running. Aborting" >&2 + exit 1 +fi + exec i3lock -u -i ~/.config/lockimage.png -c 000000