aboutsummaryrefslogtreecommitdiffstats
path: root/.config/init/funcs/mpd-cover-convert
blob: cd3569a05e3ab0069f6d14f218ec93c67b2fc881 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/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

local d
find ~/music -type f -regextype posix-extended -regex ".*cover\.(png|jpg)"\
	| while read file; do
	if [[ ! -f "${file:h}/cover-small.png" ]]; then
		convert "$file" -resize 250x "${file:h}/cover-small.png"
	fi
done