added music progress indicator
This commit is contained in:
parent
82be1731df
commit
22113dada7
@ -30,8 +30,12 @@ getVolume() {
|
||||
}
|
||||
|
||||
getMPD(){
|
||||
MPD1=$(mpc | cut -d$'\n' -f1)
|
||||
MPD2=$(mpc | cut -d$'\n' -f2)
|
||||
PERC=$(echo "$(echo $MPD2 | cut -d ' ' -f4 | cut -b2-3 | cut -d '%' -f1) 0 100" | spark | tail -n 1 | cut -b1-3)
|
||||
#PERC=$(echo "$(echo $MPD2 | cut -d ' ' -f4 | cut -b2-3 | cut -d '%' -f1) 0 100" | spark | cut -b 1-3)
|
||||
if [ "$(mpc | wc -l)" -gt 1 ]; then
|
||||
echo -n "%{F$BLUE}♫ %{F$BROWN}$(mpc | cut -d$'\n' -f1) %{F$BLUE}♫ %{F$GREY}$(mpc | cut -d$'\n' -f2 | cut -d ' ' -f1,2,4)"
|
||||
echo -n "%{F$BLUE}♫ %{F$BROWN}$MPD1 %{F$BLUE}♫ $PERC %{F$GREY}$(echo -n $MPD2 | cut -d ' ' -f1,2)"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user