From 3cc7187e7080f9f6753399d9111db899bb1a443a Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Fri, 30 May 2008 11:40:15 -0400 Subject: [PATCH] scripts: remove hardcoded music directory from thumbnail.zsh. Use a MUSIC environment variable and fall back to /home/music. The fvwm config sets this at startup. --- thumbnail.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/thumbnail.zsh b/thumbnail.zsh index a967803..62294b6 100755 --- a/thumbnail.zsh +++ b/thumbnail.zsh @@ -1,6 +1,9 @@ #!/bin/zsh -music=/stuff/music +if [[ -z "$MUSIC" ]]; then + MUSIC=/home/music +fi + 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" -- 2.43.2