diff --git a/i3/scripts/suspend.sh b/i3/scripts/suspend.sh index 3968a67..ce7de0a 100644 --- a/i3/scripts/suspend.sh +++ b/i3/scripts/suspend.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # check if locked -if !(pgrep -x "i3lock" > /dev/null) -then - bash ~/.config/i3/scripts/i3lock.sh --suspend +if ! pgrep -x "i3lock" >/dev/null; then + echo "not locked, locking" + bash ~/.config/i3/scripts/lock.sh --suspend fi -systemctl suspend \ No newline at end of file +systemctl suspend