From 37f13e15c7c75e6037cd485187893e362ff72f3b Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Thu, 18 Aug 2022 23:01:34 -0500 Subject: [add] emms config --- init-el.org | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/init-el.org b/init-el.org index 1116690..7343562 100644 --- a/init-el.org +++ b/init-el.org @@ -212,6 +212,7 @@ So, to use this file for the very first time you must (?s "[s]ecrets" toggle-secrets) (?p "[p]astebin" cicadas-paste-current-buffer) (?m "[m]astodon" mastodon) + (?e "[e]mms" emms-controls) (?w "[w]eb browser (eww)" eww))) #+end_src @@ -1916,6 +1917,7 @@ sudo apt install clangd bear #+name: bells-and-whistles #+begin_src elisp :noweb no-export :results none <> +<> #+end_src ** Lifecoach @@ -2028,6 +2030,45 @@ messages echo to the echo area. +** EMMS + + Configuration for the emacs multi media system + +#+name: emms +#+begin_src elisp :noweb no-export :results none +(package-install 'emms) + +(require 'emms-setup) +(emms-all) +(emms-default-players) + +(setq emms-source-file-default-directory "~/Music/") + +(defun update-cicadas-now-listening-to () + (with-temp-buffer + (insert + (format emms-mode-line-format + (emms-track-description + (emms-playlist-current-selected-track)))) + (write-file "/ssh:colin@cicadas.surf:~/.now-listening-to"))) + +(add-hook 'emms-player-started-hook #'update-cicadas-now-listening-to) + +(defun update-cicadas-drop-listening-to () + (with-temp-buffer + (write-file "/ssh:colin@cicadas.surf:~/.now-listening-to"))) + +(add-hook 'emms-player-stopped-hook #'update-cicadas-drop-listening-to) + +(def-my-command emms-controls + '((?e "[e]mms" emms) + (?n "[n]ext track" emms-next) + (?p "[p]revious track" emms-previous) + (?s "[s]top" emms-stop) + (? "SPACE paus" emms-pause))) + +#+end_src + * Overwrites #+name: overwrites -- cgit v1.2.3