From bf264774c5c4c935c0cb1cdadff6c93c0c21c78c Mon Sep 17 00:00:00 2001 From: "M.Zeinali" Date: Thu, 11 Jul 2024 15:20:23 +0330 Subject: [PATCH] For ImageMagick 6 <-> 7 compatibility. The convert command is deprecated in IMv7, use "magick" instead of "convert" or "magick convert" --- .config/lf/scope | 5 +++++ .config/nsxiv/exec/key-handler | 6 ++++++ .local/bin/slider | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/.config/lf/scope b/.config/lf/scope index 0d1e673e..a1f9c3d9 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -13,6 +13,11 @@ image() { fi } +# For ImageMagick 6 <-> 7 compatibility. +if type magick >/dev/null 2>&1; then + alias convert='magick' +fi + # Note that the cache file name is a function of file information, meaning if # an image appears in multiple places across the machine, it will not have to # be regenerated once seen. diff --git a/.config/nsxiv/exec/key-handler b/.config/nsxiv/exec/key-handler index 4c78f18b..b4d73595 100755 --- a/.config/nsxiv/exec/key-handler +++ b/.config/nsxiv/exec/key-handler @@ -1,4 +1,10 @@ #!/bin/sh + +# For ImageMagick 6 <-> 7 compatibility. +if type magick >/dev/null 2>&1; then + alias convert='magick' +fi + while read -r file do case "$1" in diff --git a/.local/bin/slider b/.local/bin/slider index 3460c777..9f256659 100755 --- a/.local/bin/slider +++ b/.local/bin/slider @@ -70,6 +70,11 @@ if [ -n "${audio+x}" ]; then endtime="$((totseconds-seconds))" fi +# For ImageMagick 6 <-> 7 compatibility. +if type magick >/dev/null 2>&1; then + alias convert='magick' +fi + prepdir="${prepdir:-$cache/$file}" outfile="${outfile:-$file.mp4}" prepfile="$prepdir/$file.prep"