Skip to content

Commit

Permalink
extras: Update extras/mpvc-equalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
gmt4 committed Feb 1, 2024
1 parent a13bf11 commit 0e7ac53
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions extras/mpvc-equalizer
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,19 @@ mpvc_bar_line()
{
valf=$1
min_val=-360
val=$((${valf%%.*} - $min_val))
x=10
max_val=770
cols=$(mpvc ttycols)
inc_val=$(( ( max_val - min_val ) / cols ))

inc=${inc:-$inc_val}
val=$((${valf%%.*} - min_val))
x=${inc}

str=""
while [ $x -le $val ]
while [ "$x" -le $val ]
do
str="${str}="
x=$((x + 10))
x=$((x + inc))
done
echo "$str"
}
Expand Down

0 comments on commit 0e7ac53

Please sign in to comment.