X-Git-Url: https://git.draconx.ca/gitweb/mpdhacks.git/blobdiff_plain/b93a1920abdfdcf3a2329eaf9b16197a31857eae..f8fd16189e6851dac741ffcd3d74ef1dc1df6f73:/thumbnail.zsh?ds=sidebyside diff --git a/thumbnail.zsh b/thumbnail.zsh index a967803..9734575 100755 --- a/thumbnail.zsh +++ b/thumbnail.zsh @@ -1,6 +1,9 @@ -#!/bin/zsh +#!/usr/bin/env zsh + +if [[ -z "$MUSIC" ]]; then + MUSIC=/home/music +fi -music=/stuff/music thumbs="$HOME/.fvwm/.thumbs" if ! [[ -d "$thumbs" ]]; then @@ -40,7 +43,7 @@ if [[ -z "$1" ]]; then fi if [[ -n "$ismusic" ]]; then - imgpath="$music/$(dirname "${1#$music}")/cover.jpg" + imgpath="$MUSIC/$(dirname "${1#$MUSIC}")/cover.jpg" [[ ! -f "$imgpath" ]] && imgpath="${imgpath%jpg}png" else imgpath="$1"