description | state-utils client(s) for MPD |
owner | avuton@gmail.com |
last change | Sun, 25 Oct 2009 23:48:49 +0000 (25 16:48 -0700) |
URL | git://repo.or.cz/state-utils.git |
| https://repo.or.cz/state-utils.git |
push URL | ssh://repo.or.cz/state-utils.git |
| https://repo.or.cz/state-utils.git (learn more) |
bundle info | state-utils.git downloadable bundles |
content tags
|
|
README
MPD State Utilities
-------------------
Author
------
Avuton Olrich <avuton@gmail.com>
Requirements
------------
If you're running a standard unix or unix clone this should compile clean.
Usage
-----
See the man pages for usage.
Host/Port/Password Handling
---------------------------
MPD_HOST and MPD_PORT environment variables are optional and used if they
exist. Password can also be prefixed onto the front of the MPD_HOST as such:
password@localhost
State files are stored in the directory '~/.mpd_states/'. The files are
overwritten as required.
BUGS:
-----
* Bash completion doesn't work with spaces in the state name.
* This doesn't sucessfully restore a few things, these are not really
bugs but due to MPD protocol limitations.
* Any *ids, ie. playlistid
* Random
* if a playlist was ordered in random and has
played for any length of time it will not know
what has already played.
FAQ:
----
Q: Can you make it where it can save elsewhere than $HOME/.mpd_states/?
A: I don't plan on it, unless it's done strictly for porting. If you
want it somewhere else it should be easy enough to symlink,
and if that's not possible tell me.
Bash Completion *This does not work with spaces in state names*:
# Simply copy this into your bashrc
# cat state_bashrc >> ~/.bashrc
_state-save()
{
local cur
cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=()
if (($COMP_CWORD == 1)); then
COMPREPLY=( "$( ls --color=never ~/.mpd_states/ | grep "^$cur" )" )
return 0
fi
return 0
}
complete -F _state-save state-save state-restore