diff options
author | Colin Okay <colin@cicadas.surf> | 2022-08-19 09:08:49 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-08-19 09:08:49 -0500 |
commit | ca96b1ff16f07c62f41372d0a84d9165bbc4c815 (patch) | |
tree | 0b3b94205cc996ce0ad2421ff9f956cba5e5f535 | |
parent | 37f13e15c7c75e6037cd485187893e362ff72f3b (diff) |
tweaking emms config
-rw-r--r-- | init-el.org | 23 |
1 files 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 |