2019-12-03 20:57:14 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
#
|
|
|
|
# Show a pixelated screenshot as background image of i3lock
|
|
|
|
#
|
|
|
|
# See <https://faq.i3wm.org/question/83/how-to-run-i3lock-after-computer-inactivity/>
|
|
|
|
# Copied from <https://r0tty.org/git/dotfiles/i3/tree/bin/fuzzy-i3lock>
|
|
|
|
#
|
|
|
|
|
|
|
|
screenshot="${TMPDIR:-/tmp}/fuzzy-i3lock.png"
|
|
|
|
|
2023-04-19 16:11:03 +02:00
|
|
|
scrot -o "$screenshot"
|
2023-11-30 16:09:32 +01:00
|
|
|
|
|
|
|
case $1 in
|
|
|
|
"37c3") mogrify -scale 10% -scale 1000% -blur 0x1 -dither FloydSteinberg -colors 32 "$screenshot"
|
|
|
|
;;
|
|
|
|
*) mogrify -scale 10% -scale 1000% "$screenshot"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2019-12-03 20:57:14 +01:00
|
|
|
exec i3lock -i "$screenshot"
|