sway: add lock/idle actions

This commit is contained in:
Konstantin Koslowski 2020-12-18 15:33:47 +01:00
parent ec29615e6a
commit 7af7d8dbde
2 changed files with 21 additions and 11 deletions

13
lock Executable file
View file

@ -0,0 +1,13 @@
#!/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