TODO update
[state-utils.git] / README
blobb4b74881445fbc71f6109894db91fa317dcc87a4
2                         MPD State Utilities
3                         -------------------
4 Author
5 ------
6 Avuton Olrich <avuton@gmail.com>
8 Requirements
9 ------------
10 If you're running a standard unix or unix clone this should compile clean.
12 Usage
13 -----
14 See the man pages for usage.
17 Host/Port/Password Handling
18 ---------------------------
19  MPD_HOST and MPD_PORT environment variables are optional and used if they
20 exist. Password can also be prefixed onto the front of the MPD_HOST as such:
21   password@localhost
23  State files are stored in the directory '~/.mpd_states/'. The files are 
24 overwritten as required.
26 BUGS:
27 -----
28         * Need to deal with errors differently. Probably log them, and
29                 not fail. This will change later.
31         * Bash completion doesn't work with spaces in the state name.
33         * This doesn't sucessfully restore a few things, simply by design
34                 * Any *ids, ie. playlistid
35                 * Random, if a playlist was ordered in random and has
36                         played for any length of time it will not know
37                         what has already played.
39 Diff between a proper MPD state file & a state-utils state file:
40 ----------------------------------------------------------------
41         * Add outputs
42         * Add volume
44 FAQ:
45 ----
47 Q: Can you make it where it can save elsewhere than $HOME/.mpd_states/?
48 A: I don't plan on it, unless it's done strictly for porting. If you
49         want it somewhere else it should be easy enough to symlink, 
50         and if that's not possible tell me.
52 Bash Completion *This does not work with spaces in state names*:
54 # Simply copy this into your bashrc
55 # cat state_bashrc >> ~/.bashrc
56 _state-save()
58     local cur
59     cur=${COMP_WORDS[COMP_CWORD]}
61     COMPREPLY=()
63     if (($COMP_CWORD == 1)); then
64         COMPREPLY=( "$( ls --color=never ~/.mpd_states/ | grep "^$cur" )" )
65         return 0
66     fi
68     return 0
71 complete -F _state-save state-save state-restore