;;; -*- lexical-binding: t -*- ;; This file: http://user.it.uu.se/~embe8573/emacs-init/sound.ela ;; https://dataswamp.org/~incal/emacs-init/sound.ela (while nil (shell-command "omx-play-sound ~/bo/up.mp3") ) ;; Here is the sound file (89K) - bonus points ;; if you can identify the two parts :) ;; ;; http://user.it.uu.se/~embe8573/sounds/up.mp3 ;; Here is the zsh function, in a file that is ;; 'source'd from ~/.zshenv to be visible from ;; Emacs: ;; omx-play-sound () { ;; local -a files ;; files=($@) ;; ;; check-files $files # error checking, never mind it ;; (( $? == 1 )) && return 1 ;; ;; local vol=200 ;; ;; for f in $files; do ;; sudo omxplayer \ ;; --adev local \ ;; --vol $vol \ ;; $f \ ;; > /dev/null # no verbose option in omxplayer(1) ;; done ;; } ;; Original files: ;; ;; http://user.it.uu.se/~embe8573/conf/.zshenv ;; ;; http://user.it.uu.se/~embe8573/conf/.zsh/omx