From ca96b1ff16f07c62f41372d0a84d9165bbc4c815 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 19 Aug 2022 09:08:49 -0500 Subject: tweaking emms config --- init-el.org | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/init-el.org b/init-el.org index 7343562..62d18f7 100644 --- a/init-el.org +++ b/init-el.org @@ -2045,12 +2045,18 @@ messages echo to the echo area. (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"))) + (let ((track + (first + (last + (split-string + (format emms-mode-line-format + (emms-track-description + (emms-playlist-current-selected-track))) + "/"))))) + (with-temp-buffer + (insert track) + (write-file "/ssh:colin@cicadas.surf:~/.now-listening-to")))) + (add-hook 'emms-player-started-hook #'update-cicadas-now-listening-to) @@ -2062,11 +2068,16 @@ messages echo to the echo area. (def-my-command emms-controls '((?e "[e]mms" emms) + (?a "[a]dd directory" emms-add-directory-tree) + (?t "add [t]rack" emms-add-file) + (?r "[r]emover track" emms-playlist-mode-kill-track) (?n "[n]ext track" emms-next) (?p "[p]revious track" emms-previous) (?s "[s]top" emms-stop) (? "SPACE paus" emms-pause))) + + #+end_src * Overwrites -- cgit v1.2.3