-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathlock.sh
More file actions
executable file
·18 lines (14 loc) · 795 Bytes
/
Copy pathlock.sh
File metadata and controls
executable file
·18 lines (14 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
set -euo pipefail
LOCKSCREEN_DIR=~/.cache # this dir must contain a dir called 'lockscreen'
BLURTYPE="0x4" # http://www.imagemagick.org/Usage/blur/#blur_args
mkdir -p "$LOCKSCREEN_DIR/lockscreen"
export XSECURELOCK_SAVER=saver_mpv
export XSECURELOCK_LIST_VIDEOS_COMMAND="find ${LOCKSCREEN_DIR}/lockscreen/ -type f"
export XSECURELOCK_IMAGE_DURATION_SECONDS=3600
if [ -z ${LOCKSCREEN_DIR+x} ]; then exit 1; fi # bail if lockscreen dir is not set
scrot ${LOCKSCREEN_DIR}/lockscreen-plain.png --overwrite &&
convert ${LOCKSCREEN_DIR}/lockscreen-plain.png -blur $BLURTYPE ${LOCKSCREEN_DIR}/lockscreen-blurred.png &&
mv ${LOCKSCREEN_DIR}/lockscreen-blurred.png ${LOCKSCREEN_DIR}/lockscreen/lockscreen.png &
xsecurelock &&
rm ${LOCKSCREEN_DIR}/lockscreen/lockscreen.png