#!/bin/bash IMAGE=/tmp/screen_locked.png APP=grim which $APP &> /dev/null if [ $? -eq 0 ]; then $APP $IMAGE convert -blur 4x4 $IMAGE $IMAGE swaylock -f -c 000000 -i $IMAGE rm -v $IMAGE else swaylock -f -c 000000 fi