]> git.draconx.ca Git - fvwmconf.git/blobdiff - scripts/thumbnail.zsh
scripts: Add copyright header to thumbnail.zsh.
[fvwmconf.git] / scripts / thumbnail.zsh
index a96780392c65b2e83e45a269056570ce692cfe81..de5e44f30516a69dffe2b711f2723909e2f8c8d1 100755 (executable)
@@ -1,6 +1,19 @@
-#!/bin/zsh
+#!/usr/bin/env zsh
+#
+# Copyright © 2008 Nick Bowler
+#
+# Simple thumbnail generator for use with FVWM.  Thumbnails can be generated at
+# any desired size, and are cached for future use.  Prints the cached filename
+# to standard output.
+#
+# License WTFPL2: Do What The Fuck You Want To Public License, version 2.
+# This is free software: you are free to do what the fuck you want to.
+# There is NO WARRANTY, to the extent permitted by law.
+
+if [[ -z "$MUSIC" ]]; then
+       MUSIC=/home/music
+fi
 
-music=/stuff/music
 thumbs="$HOME/.fvwm/.thumbs"
 
 if ! [[ -d "$thumbs" ]]; then
@@ -40,7 +53,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"