Conky: Display MOC info

It’s a slightly modified version of Santix’ script.

#!/bin/bash

INFO=`mocp --info`

if [ "$INFO" -- "State: STOP" ];
then

echo -n " "

else

Artist=`mocp --info | grep Artist | cut -f2 -d ":"`
Song=`mocp --info | grep SongTitle | cut -f2 -d ":"`
Album=`mocp --info | grep Album | cut -f2 -d ":"`

expr substr "$Artist - $Song ( $Album ) " 1 200

fi

Edit: For those who aren’t familiar with conky scripts: Just save the above code to a file called moc_conky.sh and add

${execi 300 /home/user/conky/scripts/moc_conky.sh}

to your conkyrc config file.

1 Comment »

  1. cagwait said

    thanks for providing this

RSS feed for comments on this post · TrackBack URI

Leave a comment