dotfiles-i3/.local/bin/fuzzy-swaylock
finga eb5ee66f1e fuzzy-i3lock, fuzzy-swaylock: Fox fuzzy lock script
Add the overlooked fuzzy-swaylock which replaces fuzzy-i3lock.
2024-09-16 09:06:19 +02:00

20 lines
536 B
Bash
Executable file

#!/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-swaylock.png"
grim "$screenshot"
case $1 in
"37c3") mogrify -scale 10% -scale 500% -dither FloydSteinberg -colors 32 -scale 200% "$screenshot"
;;
*) mogrify -scale 10% -scale 1000% "$screenshot"
;;
esac
exec swaylock -i "$screenshot"