From 67cf10c5d664427344d1a192ba3b13927bfa262b Mon Sep 17 00:00:00 2001 From: Konstantin Koslowski Date: Thu, 12 Dec 2024 13:29:24 +0100 Subject: [PATCH] sway_lock: fix imagemagick --- bin/sway_lock | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/sway_lock b/bin/sway_lock index d45a9a9..f6f79db 100755 --- a/bin/sway_lock +++ b/bin/sway_lock @@ -10,6 +10,12 @@ LOCK_APP=swaylock LOCK_ARGS=" -f -F -e -s fill -c 000000 --indicator-radius 100 --indicator-thickness 20" INHIBIT_FILE=$HOME/.inhibit_lock +CONVERT=convert +if which magick +then + CONVERT="magick convert" +fi + function _clean() { for output in $(_outputs); do SCROT_FILE=${SCROT_FILE_BASE}_${output}.${SCROT_FILE_EXT} @@ -49,8 +55,8 @@ function _screenshot() { $SCROT_APP $SCROT_APP_ARGS -o $output $SCROT_FILE # convert -blur 0x5 $SCROT_FILE $SCROT_FILE # convert -motion-blur 15x15 $SCROT_FILE $SCROT_FILE - magick convert -scale 20% -blur 2x2 -resize 500% $SCROT_FILE $SCROT_FILE - magick convert -composite -gravity center $SCROT_FILE $LOCK_IMAGE $SCROT_FILE + $CONVERT -scale 20% -blur 2x2 -resize 500% $SCROT_FILE $SCROT_FILE + $CONVERT -composite -gravity center $SCROT_FILE $LOCK_IMAGE $SCROT_FILE done }