I want to change the Clementine album art with each song. Essentially, I am trying to insert an image path in Conky that changes every few seconds.
I have a script clementine.sh that runs every 5 seconds in Conky using this line:
${execi 5 sh ~/.config/openbox/conky/clementine.sh}
The script runs the following command:
qdbus org.mpris.clementine /Player org.freedesktop.MediaPlayer.GetMetadata | grep arturl | cut -c16- > ~/.config/openbox/conky/image
What this does, is it finds the arturl from Clementine, trims it, and places it in the file image. The line overwrites each time. The line that is written looks like this:
/tmp/clementine-art-ED9078.jpg
What I would like to do, is find a way to copy the line /tmp/clementine-art-ED9078.jpg from the file image and place it in my .conkyrc file in the line:
${image "xxxx" -p 0,620 -s 75x75}
Where the xxxx is, is where I want the text to write to, so that the line:
${image "xxxx" -p 0,620 -s 75x75}
Will actually look like:
${image /tmp/clementine-art-ED9078.jpg -p 0,620 -s 75x75}
Obviously, the line will change with each song.
I am wanting to do this with a script (or directly in Conky, etc.), and not have to install any programs or anything to accomplish this. I believe it is "do-able", I just don't have a clue how to do it. I have scoured the Internet and came up with nothing I can use. Any help anyone can give me will not only be appreciated, it will make my headache go away.
Note: I am able (from Conky) to list artist, title, and album using the following lines in .conkyrc:
${font sans-serif:normal:size=8}${execi 5 qdbus org.mpris.clementine /Player org.freedesktop.MediaPlayer.GetMetadata | grep artist}
${font sans-serif:normal:size=8}${execi 5 qdbus org.mpris.clementine /Player org.freedesktop.MediaPlayer.GetMetadata | grep title}
${font sans-serif:normal:size=8}${execi 5 qdbus org.mpris.clementine /Player org.freedesktop.MediaPlayer.GetMetadata | grep album}