Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have the following in my .config/awesome/rc.lua:

--{{{ Display noify with current xmms2 playlist
function xmms2()
    local f = io.popen("nyxmms2 status -f '${artist} - ${album} - ${title}'")
    local fr = ""
    for line in f:lines() do
    fr = fr .. line .. '\n'
    end
    f:close()
    naughty.notify({ title = "Currently playing:", text = fr, timeout = 5})
end
--}}}

I would like to add album art to this.

Does anyone have an idea of how to do this?

I am looking for something like this mpd setup but for xmms2.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can use notify-send for this. It supports the --icon switch which points to the pixel graphic to be displayed. Vector graphics don't seem to be supported. This can easily be hooked into the new song event of audio players. I don't know xmms2 so I can't provide details on how to do this. This is all you need for the notifications:

notify-send --expire-time=5000 --icon="$ALBUMART" "$ARTIST" "$SONG"

This solution works with the awesome WM.

share|improve this answer
    
This is not bad and certainly a good way towards what I want. Note that --expire-time seems to be in ms on my machine. However, I still would need to find the path for the cover art and download it if it is not present. I am looking for a full solution -- lazy I know. –  Sardathrion Jan 22 '13 at 16:53
1  
Thanks, I fixed the expire-time. Finding the path is not a window manager problem, it's an issue on it's own. I would place the (not yet written) code in a shell script which can be used with any window manager. Does xmms2 have access to the icon? If yes write it to a tmp file. If not then your question tags don't relate to your problem at all. –  Marco Jan 22 '13 at 17:42
    
Asked a separate question from your comment above. –  Sardathrion Jan 23 '13 at 8:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.