From e92af1f7088cc5b6b40a5ceba275a197c305de62 Mon Sep 17 00:00:00 2001 From: katherine Date: Sat, 19 Mar 2016 22:17:28 -0700 Subject: snapshot lots of random things changed; forgot to update for a while again. moving things to .config/init/funcs is one important thing; means being able to use those shell scripts anywhere, like ranger or whatever --- .config/init/funcs/mpd-cover-convert | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 .config/init/funcs/mpd-cover-convert (limited to '.config/init/funcs/mpd-cover-convert') diff --git a/.config/init/funcs/mpd-cover-convert b/.config/init/funcs/mpd-cover-convert new file mode 100755 index 0000000..cd3569a --- /dev/null +++ b/.config/init/funcs/mpd-cover-convert @@ -0,0 +1,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 -- cgit v1.2.3