I know it is a somewhat old thread but I found a quite ugly but at least theoretically working work-around for the window reusing problem.
As long as there is only one ruby process for the user running audacious you could use the command "pkill -f ruby" in the song change plugin (you could concatenate it with the script for the lyric-retrieving or you could put it in the line "Command to run toward the end of a song").
Couldn't test it because the script won't work for me (what did you put in the song change plugin? I tried "/home/dertod/skripte/audacious.sh "%n"" but it doesn't do the trick. If I run the script in the terminal with "interpret - songname" it works).
I tried some tweaks and I think I've found a less ugly way of terminating the lyricwindow (it's still not reusing but at least not killing all ruby processes):
I made some changes to the original Lyric-Retrieving-Script:
And call it by using this command in Audacious' song-change-plugin:
$command -k gtk -a "$artist" -t "$title" --sites DarkLyrics,Lyriki,AZLyrics,LyricWiki &
(should work with every terminal-emulator, but xterm is really fast)
xterm -bg black -fg red -T 'lyrics' -e /path/to/script/SCRIPTNAME "%n" "%l"
The disadvantage is, that the window lives as long as the song WOULD last (no recognition of changing the song before) and that xterm as well as the gtk window for the lyric both get focus when incarnated (probably solvable through compiz?).
Somewhat fixed the focus-problem. There is a nifty tool called devilspie (universe repository). Here is my example .ds file (put it in ~/.devilspie):
Works fine for me (still getting into focus for a short time, but well, a lot better than before).
(if (is (application_name) "wikilyrics.rb") (minimize) )
(if (is (window_name) "lyrics") (minimize) )
(if (is (window_name) "lyrics") (skip_tasklist) )
and yet another edit:
Found a way to (at least i hope so) safely kill an existing lyric-window on song change (and only this *hope*). I just added the line:
right after the shebang (the rest of the script is still the same).
pkill -9 -f wikilyrics.rb