| 1 | = MPD Status = |
| 2 | |
| 3 | MPD Status is a quick Python script to display some details about the track currently playing in [http://www.musicpd.org/ MPD]. It is intended for use in [http://wmii.de wmii]'s status bar. |
| 4 | |
| 5 | If you want a more featureful status bar, check out [http://wmii.de/index.php/Contrib/Szs3rd szs3rd], from which I shamelessly copied and hacked the {{{mpc.py}}} module. |
| 6 | |
| 7 | == Features == |
| 8 | * Displays currently playing/paused song (that's a given really) with time. |
| 9 | * If metadata isn't provided, falls back to the basename of the file. |
| 10 | |
| 11 | == Requirements == |
| 12 | * [http://www.python.org/ Python 2.4]. |
| 13 | * [http://www.musicpd.org/mpc.shtml mpc]. |
| 14 | |
| 15 | == Download == |
| 16 | Checkout [source:mpd-status/trunk/ mpd-status/trunk/] from the [http://subversion.tigris.org/ Subversion] repository: |
| 17 | {{{ |
| 18 | svn co http://svn.bleah.co.uk/repos/misc/mpd-status/trunk |
| 19 | }}} |
| 20 | or, since it is just the one file, grab it via HTTP from http://svn.bleah.co.uk/repos/misc/mpd-status/trunk/mpd-status.py |
| 21 | |
| 22 | == Installation and Usage == |
| 23 | (Instructions are based around the setup for wmii 2 in [http://www.debian.org/ Debian], please add generic instructions where they differ) |
| 24 | 1. Place {{{mpd-status.py}}} somewhere, like {{{/usr/local/bin/}}} or {{{~/.wmii/scripts/}}}. |
| 25 | 1. Copy {{{/etc/wmii/status.sh}}} to {{{~/.wmii/status.sh}}} and edit it, or edit {{{/etc/wmii/status.sh}}} directly. |
| 26 | 1. Edit the following line to include "{{{`python2.4 /path/to/mpc.py`}}}" (see patch attached to this page for an example): |
| 27 | {{{ |
| 28 | text="`date` `uptime | sed -e 's/.*://' -e 's/,//g'`" |
| 29 | }}} |
| 30 | 1. Restart wmii: {{{/etc/wmii/rc restart}}} |
| 31 | |
| 32 | You should see some extra text on your wmibar, either "--Not playing--" or your currently playing/paused track. |