cmus/cmus — pull request #69 by pnelson (2013-10-25 13:38:44+00:00)
Title: Support XDG directories with backwards compatibility. Fixes #33.

To determine where the configuration files are located, the logic
is as follows:

- CMUS_HOME takes priority, as before.
- ~/.cmus is used if it already exists, to maintain backward
compatibility.
- New users default to XDG_CONFIG_HOME/cmus, or ~/.config/cmus if
XDG_CONFIG_HOME is unset.

To determine where the socket is located is a bit more simple:

- XDG_RUNTIME_DIR/cmus-socket if XDG_RUNTIME_DIR is set.
- Otherwise, name it 'socket' in the config directory, as before.