blob: 3c81bfb145d7c849cf56828e8e6f05ea3b81de17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env zsh
# make small cover versions for mpc-notify.sh
# leaks memory for some reason, so don't run on a clean library
# or it'll crash everything
source "$HOME/.config/init/helpers" || exit 1
(local file
find ~/music -type f -regextype posix-extended -regex ".*cover\.(png|jpg)"\
| while read file; do
if [[ ! -f "${file:h}/cover-small.png" ]]; then
magick "$file" -resize 250x "${file:h}/cover-small.png"
fi
done) &
wait-anim $! "converting"
|