Last active
July 6, 2016 00:40
-
-
Save realazizk/a2c9435332f45a1046738d68f1f33d43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defconst rocky-music-file "/home/mohamed/rocky.mp3") | |
(defvar rocky-music-process nil) | |
(defun rocky-start-music () | |
(interactive) | |
(unless rocky-music-process | |
(setq rocky-music-process (start-process-shell-command "rocky-music" "rocky-music" (concat "mplayer " rocky-music-file " -loop 0"))))) | |
(defun rocky-stop-music () | |
(interactive) | |
(when rocky-music-process | |
(delete-process rocky-music-process) | |
(setq rocky-music-process nil))) | |
(rocky-start-music) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment