new lock script

This commit is contained in:
Ryan Kes 2019-03-24 14:54:22 +01:00
parent cf44946dfd
commit 72a40564c0
2 changed files with 10 additions and 9 deletions

13
lock
View file

@ -1,10 +1,11 @@
#!/bin/sh
if [ -e /usr/bin/i3lock-fancy ]
then
i3lock-fancy -p -n
elif [ -e /usr/bin/i3lock ]
then
i3lock -e -b -f -i ~/.cache/lock.png
NUMBER_OF_SCREENS="$(xrandr | grep -c '\*')"
if [ "$NUMBER_OF_SCREENS" -gt 1 ]
then
scrot "lock.png" -e 'mv $f ~/.cache/'
corrupter ~/.cache/lock.png ~/.cache/lock.png
fi
i3lock -e -b -f -i ~/.cache/lock.png