hnarayanan/shpotify

Enhancement thought

willhaslett opened this issue · 2 comments

Thank you so much for this script! It's a big help in maintaining the flow state throughout the day.

On my setup, 10% is too coarse as an interval for volume adjustment. I easily changed it to 5% as shown below, but I also wanted to share the thought that this value could be configurable, either as a runtime argument or as a constant declared at the top of the script. If others think it's a good idea, I'd be happy to implement it and do a PR.

            elif [ "$2" = "up" ]; then
                if [ $vol -le 95 ]; then
                    newvol=$(( vol+5 ));
                    cecho "Increasing Spotify volume to $newvol.";
                else
                    newvol=100;
                    cecho "Spotify volume level is at max.";
                fi
            elif [ "$2" = "down" ]; then
                if [ $vol -ge 5 ]; then
                    newvol=$(( vol-5 ));
                    cecho "Reducing Spotify volume to $newvol.";
                else
                    newvol=0;
                    cecho "Spotify volume level is at min.";
                fi

This is a great idea. Please just make it a constant at the top of the script and we’ll see if anyone has strong opinions against this. (I have no issues.)

Will do. btw, "shpotify" is pure gold. Your users will get it, and it's fun to say.