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.

About these ads

1 Comment »

  1. cagwait said

    thanks for providing this

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: