Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- MUSIC_DIR=/media/addy/Media/musik/
- COVER=/tmp/cover.png
- back="/home/addy/cover.png"
- { album="$(mpc --format %album% current)"
- file="$(mpc --format %file% current)"
- album_dir="${file%/*}"
- [[ -z "$album_dir" ]] && exit 1
- album_dir="$MUSIC_DIR/$album_dir"
- covers="$(find "$album_dir" -type d -exec find {} -maxdepth 1 -type f -iregex ".*/.*\(${album}\|cover\|folder\|artwork\|front\).*[.]\(jpe?g\|png\|gif\|bmp\)" \; )"
- src="$(echo -n "$covers" | head -n1)"
- rm -f "$COVER"
- convert "$src" -resize 150 "$COVER"
- n30f -b -x 1095 -y 40 -d ${back}
- n30f -b -x 1120 -y 65 -d ${COVER}
- } &
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement