From 9ace25a78cdd79ae0da3c26cff4485f79b0d6100 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Fri, 1 Jan 2016 09:45:39 +1100 Subject: [PATCH] Save smart_crop_mode in the image filename, this way we can save one image for each mode --- fetch.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fetch.sh b/fetch.sh index 551b45de..cd077f07 100755 --- a/fetch.sh +++ b/fetch.sh @@ -436,8 +436,12 @@ if [ $images == "on" ]; then [ $wall == "on" ] && \ img=$(awk '/feh/ {printf $3}' "$HOME/.fehbg" | sed -e "s/'//g") - # Get name of image and prefix it with it's crop offset - imgname="$crop_offset-${img##*/}" + # Get name of image and prefix it with it's crop offset or smart_crop mode + if [ $smart_crop == "on" ]; then + imgname="$smart_crop_mode-${img##*/}" + else + imgname="$crop_offset-${img##*/}" + fi # This check allows you to resize the image at launch if [ -f "$imgtempdir/$imgname" ]; then