Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option 'nyan-music-player' along with support for mpv #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add option 'nyan-music-player' along with support for mpv #42

wants to merge 1 commit into from

Conversation

ksqsf
Copy link

@ksqsf ksqsf commented Oct 7, 2018

I use mpv instead of mplayer so I changed nyan-mode a little bit.

I hope this change is small enough not to disturb mplayer users. :-)

along with support for mpv
(cond ((string-equal nyan-music-player "mplayer")
(concat "mplayer " +nyan-music+ " -loop 0"))
((string-equal nyan-music-player "mpv")
(concat "mpv " +nyan-music+ " -loop 0"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work? Locally I use:

(start-process-shell-command "nyan-music"
                             "nyan-music"
                             (concat "mpv --no-video --loop=inf " nyan-music))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or for a copy paste solution if/until this gets merged:

(use-package nyan-mode
  :config
  (defun my/nyan-start-music ()
    (unless nyan-music-process
      (setq nyan-music-process
	    (start-process-shell-command
	     "nyan-music"
             "nyan-music"
             (concat "mpv " nyan-music " --loop=inf")))))
  (advice-add 'nyan-start-music :override 'my/nyan-start-music)
  (nyan-mode 1)
  (unless (nyan--is-animating-p) (nyan-start-animation))
  (nyan-start-music))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants