[vitunes] sending commands to running vitunes

  • From: kilian <kilian.klimek@xxxxxxxxxxxxxx>
  • To: vitunes <vitunes@xxxxxxxxxxxxx>
  • Date: Fri, 18 Feb 2011 00:56:07 +0100

Hello,

I just implemented a nice new feature to send commands to vitunes from
the command line.

With -c it's possible to send a command to a running vitunes instance.
The :pl, or :playlist, command lets you jump to a playlist by name. So,
if you have vitunes running in some terminal, you can execute:

    vitunes -c 'pl Cool_Playlist' -c 'media_play'

to start listening to Cool_Playlist. There is no sugar for the commands
at the moment (you'll have to use the keybindings or command names used
by vitunes internally).

One note about how commands are executed, when send to vitunes via the
-c switch: it will first try to find a keybinding and if that fails just
execute it as a command.

Since the patch got a little larger I pushed it to repo.or.cz (branch:
socket). Diff view here:
http://repo.or.cz/w/vitunes.git/commitdiff/f3bb39d26eb5378aa58c199c8fbd8fef46e6ea2a

Feedback welcome!

-kilian

Other related posts: