sway_lock: fix imagemagick

This commit is contained in:
Konstantin Koslowski 2024-12-12 13:29:24 +01:00
parent 715ab80b1e
commit 67cf10c5d6

View file

@ -10,6 +10,12 @@ LOCK_APP=swaylock
LOCK_ARGS=" -f -F -e -s fill -c 000000 --indicator-radius 100 --indicator-thickness 20" LOCK_ARGS=" -f -F -e -s fill -c 000000 --indicator-radius 100 --indicator-thickness 20"
INHIBIT_FILE=$HOME/.inhibit_lock INHIBIT_FILE=$HOME/.inhibit_lock
CONVERT=convert
if which magick
then
CONVERT="magick convert"
fi
function _clean() { function _clean() {
for output in $(_outputs); do for output in $(_outputs); do
SCROT_FILE=${SCROT_FILE_BASE}_${output}.${SCROT_FILE_EXT} SCROT_FILE=${SCROT_FILE_BASE}_${output}.${SCROT_FILE_EXT}
@ -49,8 +55,8 @@ function _screenshot() {
$SCROT_APP $SCROT_APP_ARGS -o $output $SCROT_FILE $SCROT_APP $SCROT_APP_ARGS -o $output $SCROT_FILE
# convert -blur 0x5 $SCROT_FILE $SCROT_FILE # convert -blur 0x5 $SCROT_FILE $SCROT_FILE
# convert -motion-blur 15x15 $SCROT_FILE $SCROT_FILE # convert -motion-blur 15x15 $SCROT_FILE $SCROT_FILE
magick convert -scale 20% -blur 2x2 -resize 500% $SCROT_FILE $SCROT_FILE $CONVERT -scale 20% -blur 2x2 -resize 500% $SCROT_FILE $SCROT_FILE
magick convert -composite -gravity center $SCROT_FILE $LOCK_IMAGE $SCROT_FILE $CONVERT -composite -gravity center $SCROT_FILE $LOCK_IMAGE $SCROT_FILE
done done
} }