Move environment variable defaults to initial variable declaration
Reduce the verbose syntax and use bash idioms instead.
This commit is contained in:
parent
e0a0e9ce1c
commit
866aafc8cd
10
kunst
10
kunst
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
VERSION=1.3.4
|
VERSION=1.3.4
|
||||||
COVER=/tmp/kunst.jpg
|
COVER=/tmp/kunst.jpg
|
||||||
MUSIC_DIR=~/Music
|
MUSIC_DIR="${KUNST_MUSIC_DIR:-~/Music}"
|
||||||
SIZE=250x250
|
SIZE="${KUNST_SIZE:-250x250}"
|
||||||
POSITION="+0+0"
|
POSITION="${KUNST_POSITION:-+0+0}"
|
||||||
ONLINE_ALBUM_ART=false
|
ONLINE_ALBUM_ART=false
|
||||||
PROG_NAME=$(basename "$0")
|
PROG_NAME=$(basename "$0")
|
||||||
|
|
||||||
|
@ -212,10 +212,6 @@ main() {
|
||||||
}
|
}
|
||||||
done
|
done
|
||||||
|
|
||||||
[ "$KUNST_MUSIC_DIR" != "" ] && MUSIC_DIR="$KUNST_MUSIC_DIR"
|
|
||||||
[ "$KUNST_SIZE" != "" ] && SIZE="$KUNST_SIZE"
|
|
||||||
[ "$KUNST_POSITION" != "" ] && POSITION="$KUNST_POSITION"
|
|
||||||
|
|
||||||
# Flag to run some commands only once in the loop
|
# Flag to run some commands only once in the loop
|
||||||
FIRST_RUN=true
|
FIRST_RUN=true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue