You are not logged in.

#1 2008-01-05 21:50:57

bionnaki
Member
Registered: 2006-09-05
Posts: 289

moc + conky?

I really enjoy moc and would like to have my current music displayed in conky. I tried  this but I couldnt get it to work. here's what I did:

put script as moc.sh and made executable

#!/bin/sh

TITLE="`mocp -i | grep 'Title:' | sed -e 's/^.*: //'`";
if [ "$TITLE" != "" ]; then
  ARTIST="`mocp -i | grep 'Artist:' | sed -e 's/^.*: //'`";
  SONGTITLE="`mocp -i | grep 'SongTitle:' | sed -e 's/^.*: //'`";
  ALBUM="`mocp -i | grep 'Album:' | sed -e 's/^.*: //'`";
  if [ "$ARTIST" != "" ]; then ARTIST="$ARTIST - "; fi
  if [ "$ALBUM" != "" ]; then ALBUM="($ALBUM)"; fi
  echo $ARTIST $SONGTITLE $ALBUM
else echo „MOC"
fi

I put this in into my .conkyrc

${exec 30 ~/scripts/moc.sh | fold -w55 -s}

but nothing shows up. what I am doing wrong? thanks.

Offline

#2 2008-01-07 01:02:25

bionnaki
Member
Registered: 2006-09-05
Posts: 289

Re: moc + conky?

hmm still not working
argh

Offline

#3 2008-01-07 01:50:18

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: moc + conky?

For one thing -- if you want it to update every 30 seconds the conky variable is "execi" not "exec".

Offline

#4 2008-01-07 02:16:54

bionnaki
Member
Registered: 2006-09-05
Posts: 289

Re: moc + conky?

that was it - duh.
works great now.

Offline

Board footer

Powered by FluxBB