Page 1 of 6 123 ... LastLast
Results 1 to 10 of 51

Thread: Making Conky Show What Songbird Is Playing

  1. #1
    Join Date
    Jun 2008
    Beans
    67

    Making Conky Show What Songbird Is Playing

    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

  2. #2
    Join Date
    Nov 2007
    Beans
    52

    Re: Making Conky Show What Songbird Is Playing

    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?

  3. #3
    Join Date
    Dec 2007
    Location
    South Africa
    Beans
    310
    Distro
    Ubuntu

    Re: Making Conky Show What Songbird Is Playing

    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

  4. #4
    Join Date
    Nov 2007
    Beans
    52

    Re: Making Conky Show What Songbird Is Playing

    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
    Code:
    ~/songbird.txt
    6. Open your .conkyrc file
    7. Type this into the TEXT section:
    Code:
    ${execi 1 tail -n3 ~/songbird.txt | fold -w50}
    ****The "1" after execi means the info will refresh every second - edit as needed.******
    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.
    Attached Images Attached Images
    Last edited by parm289; November 27th, 2008 at 09:07 AM.

  5. #5
    Join Date
    May 2008
    Beans
    45

    Re: Making Conky Show What Songbird Is Playing

    Quote Originally Posted by parm289 View Post
    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
    Code:
    ~/songbird.txt
    6. Open your .conkyrc file
    7. Type this into the TEXT section:
    Code:
    ${execi 1 tail -n3 ~/songbird.txt | fold -w50}
    ****The "1" after execi means the info will refresh every second - edit as needed.******
    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.
    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)

  6. #6
    Join Date
    Jul 2008
    Beans
    565

    Re: Making Conky Show What Songbird Is Playing

    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
    Attached Files Attached Files
    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)

  7. #7
    Join Date
    Nov 2007
    Beans
    52

    Re: Making Conky Show What Songbird Is Playing

    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.

  8. #8
    Join Date
    Aug 2008
    Beans
    71
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Making Conky Show What Songbird Is Playing

    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}

  9. #9
    Join Date
    Jul 2008
    Beans
    565

    Re: Making Conky Show What Songbird Is Playing

    Quote Originally Posted by anxiousdog View Post
    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:

    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}
    This will only display the track name and length. You'll have to grab this new version that returns the track length too.
    Attached Files Attached Files
    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)

  10. #10
    Join Date
    Aug 2008
    Beans
    71
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Making Conky Show What Songbird Is Playing

    Quote Originally Posted by eightmillion View Post
    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:

    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}
    This will only display the track name and length. You'll have to grab this new version that returns the track length too.
    Thanks for this! I added the new version and the code:

    ${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}
    Unfortunately I am getting an error

    sh: /home/anxiousdog/Conky/songbird.py: Permission denied
    I seem to remember this being something with the exec command...? Not sure what to do!

Page 1 of 6 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •