Slamd64

Please see www.slamd64.com for information on Slamd64.

Twitter

RSS Feed Available

permalink :: trackback

mprisshell
(posted by Fred Emmott at 2008-08-23 07:58:44)

I've written a small bash CLI interface to MPRIS players, available at http://files.fredemmott.co.uk/mprisshell.sh.

It's currently rather limited in functionality:

Usage: mprisshell.sh [command]
Commands:
  play                          Start playing the current track
  pause                         Pause the current track
  playpause                     If a track is playing, pause it; otherwise, play the current track
  next                          Skip to the next track
  previous                      Skip to the previous track
  incVolume [percentage]        Increase the volume by 10%, or the given percentage
  decVolume [percentage]        Decrease the volume by 10%, or the given percentage

It sends the above commands to the first MPRIS-capable player found; this includes the latest git head of YANIHP, Amarok 2, Audacious, and others. It's meant for normal users, not developers, for example as a program to bind to media keys.

Trackbacks

No trackbacks for this post

Comments

Something a bit random

Posted at 2008-08-23 19:59:28 GMT +0000 by "Anonymous"

I read "mprisshell" as a VERY misspelled "misspell" first. Our mind is beautiful :)

May I suggest changing the volume commands

Posted at 2008-08-24 05:31:53 GMT +0000 by "Henry"

May I suggest changing the volume commands? incVolume and decVolume, with an optional percentage change just seems quite clunky to me. Personally, I'm never a fan of camelCase on the command line. Some options could be: Change the command to 'volume 0-100', so the user could write 'mprisshell.sh volume 80' to set it to 80%? Shorten the commands to incvol/decvol, and make them case-insensitive? Or, 'volume +/-percentage'? What do you think?

Interesting

Posted at 2008-08-24 09:46:19 GMT +0000 by "gttt"

I had written such a similar script, but without dbus. It checks via the pidof-command if the one or other player is running and then is using this special command to address the player. e.g. "amarok -e track.mp3" or "xmms2 add track-mp3". While the dbus solution has a much cleaner concept, I would like to know if it already works with xmms2? As far as I found there are only plans to get xmms2 mpris compatible. What is missing currently are the commands: clear -- clear the playlist add -- add a single track radd -- add a directory recursivly rdir -- (I have named it like this, maybe you find a better name) add only the direct children of a directory, not recursively. where rdir is done like this: find "$RDIR/" -maxdepth 1 -type f | sort | xargs -d "\n" xmms2 add

Formatting

Posted at 2008-08-24 09:47:55 GMT +0000 by "gttt"

Oh the formatting of the post is lost in HTML. It should be printed in <pre> tags IMHO.

Submit a comment

What cows drink:
Name:
Subject:
Message:

Valid XHTML Valid CSS