ok100/lyvi — pull request #13 by Kauhsa (2013-11-26 22:14:05+00:00)
Title: Use cmus-remote to figure out if cmus is running

Old version checked the existence of unix socket instead. This caused a problem because the socket location is different in case XDG_RUNTIME_DIR environment variable is set (see https://github.com/cmus/cmus/blob/master/misc.c#L221) - the code could check this additional location too, but this solution felt better since the code is using cmus-remote already anyway.

Blame told me that XDG_RUNTIME_DIR change is new - might not be an issue with ArchLinux cmus package, but I ran into problems when using cmus-git. 'cmus-remote -C' has apparently been there forever, though - see https://github.com/cmus/cmus/blame/master/main.c#L146.