Lord_Illidan /bansheeprogress.sh

This uses qalc to generate a percentage for banshee-1, which is then passed to conky for the progress bar.
#!/bin/bash

isrunning=$(ps aux | grep [b]anshee-1 | cut -c66-74 | cut -f1 -d ' ')

if [ "$isrunning" != "" ]
then
   elapsed=$(banshee-1 --query-position | cut -f2- -d' ')
   duration=$(banshee-1 --query-duration | cut -f2- -d' ')
   isplaying=$(banshee-1 --query-current-state | cut -f2- -d' ')

   if [ "$isplaying" != "idle" ]
   then
      

      ratio=$(qalc -t $elapsed/$duration | cut -c3-6)
      percent=$(qalc -t $ratio/100)

      echo $percent
   fi
fi