From eacde3a34066e799699bb78770ab1518d26c9bc5 Mon Sep 17 00:00:00 2001 From: TravonteD Date: Mon, 14 Oct 2019 08:27:37 -0400 Subject: [PATCH] add "position to the command line argurments and environment variables --- kunst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kunst b/kunst index 834e8a3..b129a6e 100755 --- a/kunst +++ b/kunst @@ -32,7 +32,7 @@ show_help() { # Parse the arguments -options=$(getopt -o h --long size:,music_dir:,version,silent,help -- "$@") +options=$(getopt -o h --long position:,size:,music_dir:,version,silent,help -- "$@") eval set -- "$options" while true; do @@ -41,6 +41,10 @@ while true; do shift; SIZE=$1 ;; + --position) + shift; + POSITION=$1 + ;; --music_dir) shift; MUSIC_DIR=$1 @@ -183,6 +187,7 @@ main() { [[ $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 FIRST_RUN=true