Results 1 to 5 of 5

Thread: Conky Music Player (VLC)?

  1. #1
    Join Date
    Oct 2007
    Beans
    166
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Conky Music Player (VLC)?

    Anyone know where I can get a script to show what I'm currently playing,
    I've seen it before with MPD but MPD isn't working for me, any idea on how I can get Conky to work with VLC on now playing, etc? I'd appreciate it thanks!

  2. #2
    Join Date
    Nov 2007
    Location
    Pittsburgh, Pa
    Beans
    325
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Conky Music Player (VLC)?

    as far as I can tell their is no offical way of doing it, however here is a link to a vlc forum that by the end of page one they find a way of doing it if you don't mind manually editing the conky rc file, the code is on the forum so you can just cut and paste it.

  3. #3
    Join Date
    Mar 2012
    Beans
    2

    Re: Conky Music Player (VLC)?

    Hi all,
    I have written a litte script which uses the window-title of you vlc. the script looks like this:

    Code:
    #!/bin/bash
    
    line=$(exec xlsclients -l | grep "VLC media player" | cut -c -9 --complement)
    line=${line%" - VLC media player"}
    echo $line;
    It reads the window-title and than it formats the string,
    so at the end it returns only the track vlc is actually playing.

    in your conkyrc-file you can add it with following line:

    Code:
    ${execi 1 "FILEPATH_TO_THE_SCRIPT_ABOVE./script.sh}
    (in this case the script is called script.sh, the 1 defines an interval of 1 sec)

    i hope this post will be useful for everyone who wants to include the vlc-tracknames into conky.

    L§!N

  4. #4
    Join Date
    Feb 2013
    Beans
    3

    Re: Conky Music Player (VLC)?

    This can be put directly in conky w/o need for shell script:
    Code:
    ${exec xlsclients -l | grep "VLC media player" | cut -c -9 --complement | sed -e "s/^.*: //g" \
    | sed -e ':a;N;$!ba;s/\n/ - /g' | head -c -19 | sed 's/\(.\{,100\}\).*/\1/'}
    I honestly don't understand sed, I hacked this together from various posts around the 'net, but the "100" is the limit I set for the length of text that will show.

  5. #5
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu 14.10 Utopic Unicorn

    Re: Conky Music Player (VLC)?

    foxanthony, please start a new thread; this one's quite old.

    Closed.

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
  •