total=$(playerctl metadata | grep length | awk -v n=1000000 '{ printf "%.2f\n", $3/n }')
len=$(playerctl position)
perc=$( echo $len | awk -v total=$total '{ printf "%d\n", ($1 / total) * 100 }')
echo $perc