diff options
| author | Robert Günzler <r@gnzler.io> | 2022-11-24 21:13:31 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2022-11-24 21:13:31 +0100 |
| commit | 730e6f482bf18c0e4c115b30043dc27a1fe45759 (patch) | |
| tree | 00d32d8887f772a2d99abc38d32423781c3323b9 /bin/lock | |
| parent | 0f44525bd428ad70690f07eccf34efa64609e197 (diff) | |
bin/lock: implement blur with ffmpeg
Diffstat (limited to 'bin/lock')
| -rwxr-xr-x | bin/lock | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/lock b/bin/lock index eee8707..7aee163 100755 --- a/bin/lock +++ b/bin/lock @@ -21,9 +21,19 @@ if swaylock --help 2>&1 | grep -q effect; then --timestr '%H:%M' --datestr '%F' #--grace 2 --grace-no-mouse --grace-no-touch ) +else + vf="scale=h=500:w=-1,boxblur=9:4" + for o in $(swq list output | jq -r '.[].name' | grep -v i3); do + i="/tmp/lock-$o.png" + rm "$i" || true + grim -o "$o" - | ffmpeg -v error -i - -vf "$vf" "$i" + images+=("$o":"$i") + done + fx_args=(--image="${images[@]}") fi for sh in "${HOME}"/.local/share/lock.d/*.sh; do + # shellcheck disable=1090 if [ -r "$sh" ]; then . "$sh" || true; fi done unset sh |