aboutsummaryrefslogtreecommitdiffstats
path: root/.config/init/funcs/mpd-cover-convert
diff options
context:
space:
mode:
authorkatherine <shmibs@airen-no-jikken.icu>2018-12-19 17:35:39 -0700
committerkatherine <shmibs@airen-no-jikken.icu>2018-12-19 17:35:39 -0700
commitdb947a1f555eab19b87cd540c831d1fc30310025 (patch)
tree5092b1757671aa384b02625f0e6dc48804b687d9 /.config/init/funcs/mpd-cover-convert
parent5b7c0ef6b8d064685713e76143d89669b0d08f7d (diff)
downloaddotfiles-db947a1f555eab19b87cd540c831d1fc30310025.tar.gz
add fancy new functions, with shared helpers
Diffstat (limited to '.config/init/funcs/mpd-cover-convert')
-rwxr-xr-x.config/init/funcs/mpd-cover-convert8
1 files changed, 6 insertions, 2 deletions
diff --git a/.config/init/funcs/mpd-cover-convert b/.config/init/funcs/mpd-cover-convert
index e8359b7..d9d7a2c 100755
--- a/.config/init/funcs/mpd-cover-convert
+++ b/.config/init/funcs/mpd-cover-convert
@@ -3,10 +3,14 @@
# leaks memory for some reason, so don't run on a clean library
# or it'll crash everything
-local d
+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
convert "$file" -resize 250x "${file:h}/cover-small.png"
fi
-done
+done) &
+
+wait-anim $! "converting"