changed some variable names
This commit is contained in:
parent
4a985bc6e2
commit
8a9e8bac34
16
kunst
16
kunst
|
@ -8,17 +8,17 @@
|
||||||
|
|
||||||
COVER=/tmp/kunst.jpg
|
COVER=/tmp/kunst.jpg
|
||||||
MUSIC_DIR=~/Music/
|
MUSIC_DIR=~/Music/
|
||||||
DIMENSION=250x250
|
SIZE=250x250
|
||||||
|
|
||||||
# Parse the arguments
|
# Parse the arguments
|
||||||
options=$(getopt -o d:D:h --long dimension:,DIR:,help -- "$@")
|
options=$(getopt -o d:D:h --long size:,DIR:,help -- "$@")
|
||||||
eval set -- "$options"
|
eval set -- "$options"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-d|--dimension)
|
-s|--size)
|
||||||
shift;
|
shift;
|
||||||
DIMENSION=$1
|
SIZE=$1
|
||||||
;;
|
;;
|
||||||
-D|--DIR)
|
-D|--DIR)
|
||||||
shift;
|
shift;
|
||||||
|
@ -26,7 +26,7 @@ while true; do
|
||||||
;;
|
;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
echo "kunst"
|
echo "kunst"
|
||||||
echo " -d, --dimension: Pass the dimension for the image.(Default: $DIMENSION)"
|
echo " -s, --size: Pass the size for the image.(Default: $SIZE)"
|
||||||
echo " -D, --DIR: Pass the Music directory that MPD plays from. (Default: $MUSIC_DIR)"
|
echo " -D, --DIR: Pass the Music directory that MPD plays from. (Default: $MUSIC_DIR)"
|
||||||
echo " -h, --help: Show this message and exit."
|
echo " -h, --help: Show this message and exit."
|
||||||
exit
|
exit
|
||||||
|
@ -104,8 +104,8 @@ update_cover() {
|
||||||
|
|
||||||
# resize the image to 250x250
|
# resize the image to 250x250
|
||||||
if [ $ARTLESS == false ]; then
|
if [ $ARTLESS == false ]; then
|
||||||
convert $COVER -resize $DIMENSION $COVER
|
convert $COVER -resize $SIZE $COVER
|
||||||
echo "kunst: resized album art to $DIMENSION"
|
echo "kunst: resized album art to $SIZE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ main() {
|
||||||
FIRST_RUN=false
|
FIRST_RUN=false
|
||||||
|
|
||||||
# display the album art using sxiv
|
# display the album art using sxiv
|
||||||
sxiv -g $DIMENSION -b $COVER -N "Kunst" &
|
sxiv -g $SIZE -b $COVER -N "Kunst" &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# waiting for an event from mpd; play/pause/next/previous
|
# waiting for an event from mpd; play/pause/next/previous
|
||||||
|
|
Loading…
Reference in New Issue