diff options
Diffstat (limited to 'prepare')
-rwxr-xr-x | prepare | 46 |
1 files changed, 29 insertions, 17 deletions
@@ -211,24 +211,33 @@ size_only () from_y=$((${from}*${size#*:})); printf "Processing %s...\n" "${size}"; - for k in ${list}; do - x=$((${k}*${size%:*})); - y=$((${k}*${size#*:})); - printf " * Generating %4sx%4s (scale: %s)\n" "${x}" "${y}" "${k}"; - find "${data}" -mindepth 1 -maxdepth 1 -type d | sort | while read image; do - name=$(printf "%s\n" "${image}" | cut -d/ -f3); # sloppy, sorry - case "${name}" in - background|lockscreen) - type="png"; # override for quality - ;; - *) - type="${TYPE}"; - ;; - esac - printf " - '%s'\n" "${name}"; - mkdir -p "${KEEP}"/${name}; + + find "${data}" -mindepth 1 -maxdepth 1 -type d | sort | while read image; do + name=$(printf "%s\n" "${image}" | cut -d/ -f3); # sloppy, sorry + case "${name}" in + background|lockscreen) + type="png"; # override for quality + ;; + *) + type="${TYPE}"; + ;; + esac + printf " * %s\n" "${name}"; + mkdir -p "${KEEP}"/${name}; + + for k in ${list}; do + x=$((${k}*${size%:*})); + y=$((${k}*${size#*:})); + printf " - Generating %4sx%4s (scale: %s)\n" "${x}" "${y}" "${k}"; + + + # resized convert "${image}/${from_x}x${from_y}.png" -resize ${x}x${y}^ "${KEEP}"/${name}/${x}x${y}.${type}; done + + # screenshot + printf " - Generating screenshot\n"; + convert "${image}/${from_x}x${from_y}.png" -resize 400x250^ "${KEEP}"/${name}/screenshot.jpg; done } @@ -443,7 +452,10 @@ X-KDE-PluginInfo-License=CC-BY-SA-4.0 EOF # write metadata to 'gnome-background-properties/Adelie.xml' - find "${KEEP}"/${name}/contents/images -type f | grep -v metadata.desktop | sort | while read file; do + find "${KEEP}"/${name}/contents/images -type f \ + | grep -v metadata.desktop \ + | grep -v screenshot \ + | sort | while read file; do cat >> "${temp}" <<EOF <wallpaper deleted="false"> <name>${description}</name> |