Added emms as doom module { :app emms } (#3581)
* Added emms dir to gitignore. * Added emms module. * Added emms module. * Added emms module. * I had a weird bug fixed it. * I suck. * Made the changer lissner requested. * Made a restart music daemon func. * Simplify config and bump package * Proofread readme Co-authored-by: Takoda J Horton <takodajhorton@protonmail.com> Co-authored-by: Henrik Lissner <henrik@lissner.net>
This commit is contained in:
parent
287e3e83b2
commit
7b07e612b4
4 changed files with 123 additions and 0 deletions
71
modules/app/emms/README.org
Normal file
71
modules/app/emms/README.org
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
#+TITLE: app/emms
|
||||||
|
#+DATE: March 6, 2021
|
||||||
|
#+SINCE: v3.0.0
|
||||||
|
#+STARTUP: inlineimages nofold
|
||||||
|
|
||||||
|
* Table of Contents :TOC_3:noexport:
|
||||||
|
- [[#description][Description]]
|
||||||
|
- [[#maintainers][Maintainers]]
|
||||||
|
- [[#module-flags][Module Flags]]
|
||||||
|
- [[#plugins][Plugins]]
|
||||||
|
- [[#prerequisites][Prerequisites]]
|
||||||
|
- [[#arch-linux][Arch Linux]]
|
||||||
|
- [[#nixos][NixOS]]
|
||||||
|
- [[#ubuntu][Ubuntu]]
|
||||||
|
- [[#troubleshooting][Troubleshooting]]
|
||||||
|
- [[#new-music-files-not-showing-up-in-database][New music files not showing up in database]]
|
||||||
|
- [[#appendix][Appendix]]
|
||||||
|
- [[#keybinds][Keybinds]]
|
||||||
|
|
||||||
|
* Description
|
||||||
|
This module enables Emacs to be used as a music player. It uses [[https://www.musicpd.org/][mpd]] as a backend
|
||||||
|
server and [[https://musicpd.org/clients/mpc/][mpc]] to update your music database.
|
||||||
|
|
||||||
|
** Maintainers
|
||||||
|
This module has no dedicated maintainers.
|
||||||
|
|
||||||
|
** Module Flags
|
||||||
|
This module provides no flags.
|
||||||
|
|
||||||
|
** Plugins
|
||||||
|
+ [[https://git.savannah.gnu.org/git/emms.git/][emms]]
|
||||||
|
|
||||||
|
* Prerequisites
|
||||||
|
This module requires an active MPD server, the MPC utility, and a music library.
|
||||||
|
|
||||||
|
** Arch Linux
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
pacman -S mpd mpc
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** NixOS
|
||||||
|
#+BEGIN_SRC nix
|
||||||
|
services.mpd.enable = true;
|
||||||
|
environment.systemPackages = [ pkgs.mpc_cli ];
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Ubuntu
|
||||||
|
#+BEGIN_SRC bash
|
||||||
|
apt install mpd mpc
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* Troubleshooting
|
||||||
|
** New music files not showing up in database
|
||||||
|
Try =M-x +emms/mpd-restart-music-daemon=. If that doesn't work restart emacs.
|
||||||
|
|
||||||
|
* Appendix
|
||||||
|
** Keybinds
|
||||||
|
+ =SPC m l= Toggles whether or not the player repeats the playlist.
|
||||||
|
+ =SPC m m= Mixes the playlist.
|
||||||
|
+ =SPC m i= Insert specific song
|
||||||
|
+ =SPC m s= Save the current playlist to a file
|
||||||
|
+ =SPC m p= Insert playlist save into current playlist
|
||||||
|
+ =g a= Sort the browser by artists
|
||||||
|
+ =g b= Sort the browser by genre
|
||||||
|
+ =X= Stops the player
|
||||||
|
+ =x= pauses the player
|
||||||
|
+ =D= in the playlist window removes that item
|
||||||
|
+ =C= clears the playlist
|
||||||
|
+ =>= move five seconds forward in the current track
|
||||||
|
+ =<= Opposite five back
|
||||||
|
+ =RET= In browser adds the artist's songs to the playlist, in the playlist starts playlist.
|
30
modules/app/emms/autoload.el
Normal file
30
modules/app/emms/autoload.el
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
;;; app/emms/autoload.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +emms/mpd-start-music-daemon ()
|
||||||
|
(interactive)
|
||||||
|
(start-process "mpd" nil "mpd")
|
||||||
|
(+emms/mpc-update-database)
|
||||||
|
(emms-player-mpd-connect)
|
||||||
|
(emms-cache-set-from-mpd-all)
|
||||||
|
(message "MPD Started!"))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +emms/mpd-kill-music-daemon ()
|
||||||
|
(interactive)
|
||||||
|
(emms-stop)
|
||||||
|
(call-process "mpd" nil nil nil "--kill")
|
||||||
|
(message "MPD Killed!"))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +emms/mpc-update-database ()
|
||||||
|
(interactive)
|
||||||
|
(call-process "mpc" nil nil nil "update")
|
||||||
|
(message "MPD Database Updated!"))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +emms/mpd-restart-music-daemon ()
|
||||||
|
(interactive)
|
||||||
|
(+emms/mpd-kill-music-daemon)
|
||||||
|
(+emms/mpd-start-music-daemon)
|
||||||
|
(message "MPD Restarted!"))
|
18
modules/app/emms/config.el
Normal file
18
modules/app/emms/config.el
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
;;; app/emms/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(use-package! emms
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(setq emms-directory (concat doom-etc-dir "emms")
|
||||||
|
emms-cache-file (concat doom-cache-dir "emms"))
|
||||||
|
:config
|
||||||
|
(emms-all)
|
||||||
|
(emms-default-players)
|
||||||
|
(map! :map emms-playlist-mode-map
|
||||||
|
:localleader
|
||||||
|
"l" #'emms-toggle-repeat-playlist
|
||||||
|
"p" #'emms-insert-playlist
|
||||||
|
"i" #'emms-insert-file
|
||||||
|
"t" #'emms-toggle-repeat-track
|
||||||
|
"s" #'emms-playlist-save
|
||||||
|
"m" #'emms-shuffle))
|
4
modules/app/emms/packages.el
Normal file
4
modules/app/emms/packages.el
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; app/emms/packages.el
|
||||||
|
|
||||||
|
(package! emms :pin "60c6172fb0ec78fc70cf8329e9be5842c041107b")
|
Loading…
Add table
Add a link
Reference in a new issue