diff options
| -rw-r--r-- | emacs-config.org | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/emacs-config.org b/emacs-config.org index ae690d2..0ef91f2 100644 --- a/emacs-config.org +++ b/emacs-config.org @@ -1160,7 +1160,24 @@ Command to review the weekend. org-agenda-custom-commands) #+end_src -*** Org Clock-table +*** Org Clock +Play org-clock sounds with ~ffplay~ if possible. +Requires =oxygen-sounds= system package. +#+begin_src elisp + (with-eval-after-load 'org-clock + (advice-add 'org-clock-play-sound :around + (lambda (cmd sound) + "Play sound with ffplay if available." + (if (file-exists-p sound) + (if (executable-find "ffplay") + (start-process "ffplay" nil + "ffplay" "-nodisp" "-autoexit" "-v" "-8" sound) + (apply cmd sound)) + (warn "Could not play file '%s'" sound)))) + (setq-default + org-clock-sound "/usr/share/sounds/oxygen/stereo/completion-success.ogg")) +#+end_src + Define a custom clocktable formatter function for ~+org-clocktable-format~. #+begin_src elisp (with-eval-after-load 'org-clock |
