Hello, everyone. I use Songbird as my default music player, but don't know how to get Conky to show what it's playing. Does anyone know how? Thanks =D
Hello, everyone. I use Songbird as my default music player, but don't know how to get Conky to show what it's playing. Does anyone know how? Thanks =D
I hate to dig up old posts, but:
Songbird has an extension called DBusBird that interfaces Songbird with DBus. Would it be possible to make a conky script to display Songbird info through DBus?
I have mine setup to work with rythmbox
Code:${color #1EDA12}${alignc}:::CURRENT SONG INFO ::: ${if_running rhythmbox}${color #1EDA12}Artist: ${color #1EDA12}${goto 50}${exec rhythmbox-client --no-start --print-playing-format %ta} ${color #1EDA12}Title: ${color #1EDA12}${goto 50}${exec rhythmbox-client --print-playing-format %tt} ${color #1EDA12}Album: ${color #1EDA12}${goto 50}${exec rhythmbox-client --no-start --print-playing-format %at} ${color #1EDA12}Genre: ${color #1EDA12}${goto 50}${exec rhythmbox-client --no-start --print-playing-format %ag}${goto 130}${color #1EDA12}Year: ${color #1EDA12}${exec rhythmbox-client --no-start --print-playing-format %ay} ${color #1EDA12}Position: ${color #1EDA12}${exec rhythmbox-client --no-start --print-playing-format %te}${goto 130}${color #1EDA12}Length: ${color #1EDA12}${exec rhythmbox-client --no-start --print-playing-format %td}${color #28AF63}$else${color #1EDA12}${alignc}${font sans:size=6:bold}No Activity${font}$endif
It seems that rythmbox is easier to monitor than songbird. Songbird, afaik, does not have such a simple command-line monitoring system, hence why DBus is required. All we need to monitor songbird is a simple python script using Dbus - if I knew python, I would write the script...but I don't.
BIG EDIT: Seems like I found a way to display the current title and artist:
1. Download/Install LiveTweeter extension for songbird
2. Go to Tools->Addons->LiveTweeter->Preferences
3. Click on messenger tab
4. Check "Activate Text File"
5. In the text box right below "Activate text file," type
6. Open your .conkyrc fileCode:~/songbird.txt
7. Type this into the TEXT section:
****The "1" after execi means the info will refresh every second - edit as needed.******Code:${execi 1 tail -n3 ~/songbird.txt | fold -w50}
8. Save your .conkyrc file and start conky!
Hope this helps anyone who is wondering how to do this! A screenshot of this in action is attached.
Last edited by parm289; November 27th, 2008 at 09:07 AM.
Nice find there, I was getting a headache trying to figure this one out.
The tweeter thing works fine. It's also possible to have long lines scroll in Conky with the ${scroll} tag so you don't have to worry about long texts and fold. Not in the documentation I found it by accident.
Code:${scroll 30${alignr} ${execi 1 cat ~/scripts/conky/songbird.txt}}
Last edited by Zularan; December 1st, 2008 at 05:17 AM.
Custom Desktop / CPU: 4x2.40 GHz / Nvidia GeForce GTX 260 / RAM: 4Gb / Ubuntu Lucid (10.04 testing)
Dell XPS 1710 / CPU: 2x2.16 GHz / Nvidia GeForce Go 7950GTX / RAM: 4Gb / Ubuntu Karmic (9.10)
I was looking for a way to get information from songbird for my conky lyrics script and I came across this thread. I implemented that and threw together a quick python script to interact with dbusbird and get the now playing info(literally less than ten minutes of work). Right now it outputs Artist - Album - Track. I'll add support for command line switches to format the output if anyone is interested. You need to have python-dbus installed to use it.
Edit: New version. It supports command line arguments in the form of %aa%tt%nn%bb where aa is artist, tt is track title, nn is number, and bb is album title. Calling it without arguments outputs Artist - Album - Title.
Examples:
$ ./songbird.py %nn%tt%bb
1 - Windowpane - Damnation
$ ./songbird.py %aa%tt
Opeth - Windowpane
$ ./songbird.py %bb%nn
Damnation - 1
Last edited by eightmillion; December 8th, 2008 at 02:50 PM. Reason: new version
Code:ruby -ne '$_.gsub(/<[^>]*>|\([^)]*\)|\[[^\]]*\]/,"").each_char{|i|STDOUT.flush.print(i);sleep(0.03)}if/(<\/li>|<ul>)<li>/' <(wget -qO- is.gd/e3EGx)
YES! I was hoping this thread would get the attention of someone willing to hack up a python script...thanks a bunch for the script and I'm glad I was able to spark the idea.
So being a little new... how can I add this to my current conky file? This is the bit that I use to show Rhythmnbox:
Code:${font Print Bold:size=14}${color2} Title: ${color1}${exec conkyRhythmbox --datatype=TI}${font} ${font Print Bold:size=14}${color2} Duration: ${color1}${exec conkyRhythmbox --datatype=PT}/${exec conkyRhythmbox --datatype=LE}${font} ${color1}${execibar 1 conkyRhythmbox --datatype=PP}
Hi anxiousdog. You're not going to be able to do exactly the same thing with songbird as you do with rhythmbox. Dbusbird doesn't make the song position available to outside applications, only the total song length. You should be able to do something like this:
This will only display the track name and length. You'll have to grab this new version that returns the track length too.Code:${font Print Bold:size=14}${color2} Title: ${color1}${exec songbird.py %tt}${font} ${font Print Bold:size=14}${color2} Duration: ${color1}${exec songbird.py %ll}
Last edited by eightmillion; December 8th, 2008 at 02:52 PM. Reason: new version
Code:ruby -ne '$_.gsub(/<[^>]*>|\([^)]*\)|\[[^\]]*\]/,"").each_char{|i|STDOUT.flush.print(i);sleep(0.03)}if/(<\/li>|<ul>)<li>/' <(wget -qO- is.gd/e3EGx)
Thanks for this! I added the new version and the code:
Unfortunately I am getting an error${font Print Bold:size=14}${color2} Title: ${color1}${exec ~/Conky/songbird.py %tt}${font}
${font Print Bold:size=14}${color2} Duration: ${color1}${exec ~/Conky/songbird.py %ll}
I seem to remember this being something with the exec command...? Not sure what to do!sh: /home/anxiousdog/Conky/songbird.py: Permission denied
Bookmarks