Tuning EMMS
Par Benjamin Drieu le mercredi 27 avril 2005, 10:00 - Blog - Lien permanent
In a previous blog entry, I talked about EMMS, a cool OGG player for Emacs based on ogg123.
Unfortunately, it missed some features I need : easy shortcuts and above all, a "pause" feature. You know, the one that is needed when your boss want to talk to you just during that crazy guitar solo.
So here is what I added in my Emacs config file:
(global-set-key "\C-xwf" 'emms-next) (global-set-key "\C-xwb" 'emms-previous) (global-set-key "\C-xwq" 'emms-stop) (global-set-key "\C-xws" 'emms-start) (global-set-key "\C-xwp" 'my-pause) (defun my-pause () (interactive) (start-process "pause-ogg123" nil "pause-ogg123"))
pause-ogg123 being a simple shell script that I've hacked because I was too lazy to do that in elisp:
#!/bin/sh if ps auxw | grep ogg123 | awk '{print $8}'| grep -q ^T ; then killall -CONT ogg123 else killall -STOP ogg123 fi
If someone has a more elegant solution than sending signals to ogg123, I'd gladly accept any patch. :-)